rust/tests/ui/int_plus_one.fixed
2019-08-28 07:23:23 +02:00

18 lines
304 B
Rust

// run-rustfix
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
#[warn(clippy::int_plus_one)]
fn main() {
let x = 1i32;
let y = 0i32;
let _ = x > y;
let _ = y < x;
let _ = x > y;
let _ = y < x;
let _ = x > y; // should be ok
let _ = y < x; // should be ok
}