Check for missing features in Cargo.toml #8070
Labels
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`
Hi,
Right not as I understand it there's no real communication between rustc to cargo about what cfg features exist in the code, only the opposite(cargo passes
--cfg
flags to rustc).But it would be a great feature IMHO to check somehow if there are any cfg features in the code that don't exist in the toml and produce a warning.
Example:
toml:
main.rs:
Real world example: rust-bitcoin/rust-secp256k1#199 A typo in a feature name, in cargo toml it was defined as
external-symbols
but in rust it wasexternal_symbols
The text was updated successfully, but these errors were encountered: