blob: 727b954ffcca8f22d7f404d6a37d23a376cb74f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#[deny(clippy::while_float)]
fn main() {
let mut x = 0.0_f32;
while x < 42.0_f32 {
//~^ while_float
x += 0.5;
}
while x < 42.0 {
//~^ while_float
x += 1.0;
}
let mut x = 0;
while x < 42 {
x += 1;
}
}
|