Warn for features not defined in a Cargo.toml #91674
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-cargo
Relevant to the cargo team, which will review and decide on the PR/issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
playground link
The current output is:
Ideally the output should look like:
This issue is in regards to the interaction of
cargo
andrustc
. Imagine that the above example is from project with this Cargo.toml:I ran into this as part of my work on the AWS Rust SDKs and you can view the PR where I fixed a bug related to this here. I was fixing a bug where it looked like some code should have compiled but it didn't due to a typo in the feature flag. It would have saved me some time if the compiler could have detected this typo and drawn my attention to it.
The text was updated successfully, but these errors were encountered: