cargo
cargo copied to clipboard
Lint for negative feature names
What it does
Checks for negative feature names with prefix no- or not-
See also https://rust-lang.github.io/rust-clippy/master/index.html?groups=cargo#negative_feature_names
Advantage
Features are supposed to be additive, and negatively-named features violate it.
Drawbacks
No response
Example
[features]
default = []
no-abc = []
not-def = []
Could be written as:
[features]
default = ["abc", "def"]
abc = []
def = []