rust-clippy/tests/ui/cfg_features.rs

13 lines
312 B
Rust
Raw Normal View History

2023-06-01 14:11:28 +00:00
#![warn(clippy::maybe_misused_cfg)]
fn main() {
#[cfg(features = "not-really-a-feature")]
let _ = 1 + 2;
#[cfg(all(feature = "right", features = "wrong"))]
let _ = 1 + 2;
#[cfg(all(features = "wrong1", any(feature = "right", features = "wrong2", feature, features)))]
let _ = 1 + 2;
}