rust/tests/ui/double_comparison.fixed

31 lines
444 B
Rust
Raw Normal View History

2023-06-10 06:43:30 -05:00
#![allow(clippy::needless_if)]
fn main() {
let x = 1;
let y = 2;
if x <= y {
// do something
}
if x <= y {
// do something
}
if x >= y {
// do something
}
if x >= y {
// do something
}
if x != y {
// do something
}
if x != y {
// do something
}
if x == y {
// do something
}
if x == y {
// do something
}
}