mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
17 lines
587 B
Rust
17 lines
587 B
Rust
#![warn(clippy::maybe_misused_cfg)]
|
|
|
|
fn main() {
|
|
#[cfg(features = "not-really-a-feature")]
|
|
//~^ ERROR: feature may misspelled as features
|
|
//~| NOTE: `-D clippy::maybe-misused-cfg` implied by `-D warnings`
|
|
let _ = 1 + 2;
|
|
|
|
#[cfg(all(feature = "right", features = "wrong"))]
|
|
//~^ ERROR: feature may misspelled as features
|
|
let _ = 1 + 2;
|
|
|
|
#[cfg(all(features = "wrong1", any(feature = "right", features = "wrong2", feature, features)))]
|
|
//~^ ERROR: feature may misspelled as features
|
|
//~| ERROR: feature may misspelled as features
|
|
let _ = 1 + 2;
|
|
}
|