You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With namespaced-features, if a feature name overlaps with an optional dependency, Cargo seems to allow an implicit feature by that name, but that doesn't seem right.
Normally if you have a feature on the right-hand-side of a feature definition, it must be a real feature. However, in this case Cargo lets it slide, which it normally doesn't.
I would expect, at least, following the rules, you would need to specify:
bitflags = []
But on top of that, I think creating features names that overlap with optional dependencies is probably not the best behavior, and likely to be confusing.
With namespaced-features, if a feature name overlaps with an optional dependency, Cargo seems to allow an implicit feature by that name, but that doesn't seem right.
Problem
Given this:
Normally if you have a feature on the right-hand-side of a feature definition, it must be a real feature. However, in this case Cargo lets it slide, which it normally doesn't.
cargo build --features bitflags
<-- doesn't build bitflagsI would expect, at least, following the rules, you would need to specify:
bitflags = []
But on top of that, I think creating features names that overlap with optional dependencies is probably not the best behavior, and likely to be confusing.
Notes
cargo 1.44.0-nightly (7019b3ed3 2020-03-17)
cc @djc
The text was updated successfully, but these errors were encountered: