Hello guys i’m a noob with rust and i’m playing with optional dependencies and i’m getting this error:
namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the command-line
This is my Cargo.toml
:
[package]
name = "cargo_features"
version = "0.1.0"
edition = "2021"
[dependencies]
serde = { version = "1.0", features = ["derive"], optional = true }
rgb = { version = "0.8.25", features = ["serde"], optional = true }
# we can add optional features we need to put the key "optional dependencies" as true
[features]
# features are disabled by default, but we can enable them by default
color = ["dep:rgb"]
Thanks!