Open
Description
If I have a crate like:
[package]
name = "foo"
[features]
myfeature = []
another = []
[[example]]
name = "myexample"
required-features = ["myfeature", "another"]
It would be awesome if cargo run --example myexample
automatically enabled the myfeature
feature for me, rather than producing an error message like it does today. There is no situation where I can do anything useful without padding the additional --features myfeature
flag.
This is the current message:
error: target `myexample` requires the features: `myfeature`, `another`
Consider enabling them by passing e.g. `--features="myfeature another"`
See also #2911