Should warn on optional dep not used in any feature #9088
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
A-features
Area: features — conditional compilation
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Cargo could raise a warning when user defines an optional dependency which is not part of any feature.
I've been confused for a while trying to figure out why building my single feature project with
--all-features
was working while building it with--features=my-feature
was not. Turned out I forgot to include one optional dep with the feature. Such warning would have prevent me from doing such stupid mistake. :)The text was updated successfully, but these errors were encountered: