rust-clippy/tests/ui/cfg_features.rs
2023-06-02 09:01:51 +00:00

12 lines
312 B
Rust

#![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;
}