We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn usages of features that are not defined in features section of Cargo.toml and are not optional dependencies.
features
Cargo.toml
undefined-features
correctness, suspicious
No response
fn foo() {} #[cfg(feature = "bar")] fn bar() {}
If feature "bar" is not defined in Cargo.toml, the code above could be written as:
"bar"
fn foo() {}
The text was updated successfully, but these errors were encountered:
Duplicate of #1614.
Sorry, something went wrong.
Looks like there is also #11649 for this. There is also native support coming to rustc/cargo, see rust-lang/rust#82450
Closing in favour of rust-lang/rust#82450
No branches or pull requests
What it does
Warn usages of features that are not defined in
features
section ofCargo.toml
and are not optional dependencies.Lint Name
undefined-features
Category
correctness, suspicious
Advantage
Drawbacks
No response
Example
If feature
"bar"
is not defined inCargo.toml
, the code above could be written as:The text was updated successfully, but these errors were encountered: