rust/tests/ui/double_neg.rs

9 lines
113 B
Rust

#[warn(clippy::double_neg)]
#[allow(clippy::no_effect)]
fn main() {
let x = 1;
-x;
-(-x);
--x;
}