]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/int_plus_one.fixed
Rollup merge of #102581 - jyn514:src-detection, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / int_plus_one.fixed
1 // run-rustfix
2
3 #[allow(clippy::no_effect, clippy::unnecessary_operation)]
4 #[warn(clippy::int_plus_one)]
5 fn main() {
6     let x = 1i32;
7     let y = 0i32;
8
9     let _ = x > y;
10     let _ = y < x;
11
12     let _ = x > y;
13     let _ = y < x;
14
15     let _ = x > y; // should be ok
16     let _ = y < x; // should be ok
17 }