@@ -5,91 +5,63 @@ LL | 1f32 == ONE;
55 | ^^^^^^^^^^^ help: consider comparing them within some error: `(1f32 - ONE).abs() < error`
66 |
77 = note: `-D clippy::float-cmp-const` implied by `-D warnings`
8- note: `f32::EPSILON` and `f64::EPSILON` are available.
9- --> $DIR/float_cmp_const.rs:20:5
10- |
11- LL | 1f32 == ONE;
12- | ^^^^^^^^^^^
8+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
139
1410error: strict comparison of `f32` or `f64` constant
1511 --> $DIR/float_cmp_const.rs:21:5
1612 |
1713LL | TWO == ONE;
1814 | ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() < error`
1915 |
20- note: `f32::EPSILON` and `f64::EPSILON` are available.
21- --> $DIR/float_cmp_const.rs:21:5
22- |
23- LL | TWO == ONE;
24- | ^^^^^^^^^^
16+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
2517
2618error: strict comparison of `f32` or `f64` constant
2719 --> $DIR/float_cmp_const.rs:22:5
2820 |
2921LL | TWO != ONE;
3022 | ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() > error`
3123 |
32- note: `f32::EPSILON` and `f64::EPSILON` are available.
33- --> $DIR/float_cmp_const.rs:22:5
34- |
35- LL | TWO != ONE;
36- | ^^^^^^^^^^
24+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
3725
3826error: strict comparison of `f32` or `f64` constant
3927 --> $DIR/float_cmp_const.rs:23:5
4028 |
4129LL | ONE + ONE == TWO;
4230 | ^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE + ONE - TWO).abs() < error`
4331 |
44- note: `f32::EPSILON` and `f64::EPSILON` are available.
45- --> $DIR/float_cmp_const.rs:23:5
46- |
47- LL | ONE + ONE == TWO;
48- | ^^^^^^^^^^^^^^^^
32+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
4933
5034error: strict comparison of `f32` or `f64` constant
5135 --> $DIR/float_cmp_const.rs:25:5
5236 |
5337LL | x as f32 == ONE;
5438 | ^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(x as f32 - ONE).abs() < error`
5539 |
56- note: `f32::EPSILON` and `f64::EPSILON` are available.
57- --> $DIR/float_cmp_const.rs:25:5
58- |
59- LL | x as f32 == ONE;
60- | ^^^^^^^^^^^^^^^
40+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
6141
6242error: strict comparison of `f32` or `f64` constant
6343 --> $DIR/float_cmp_const.rs:28:5
6444 |
6545LL | v == ONE;
6646 | ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() < error`
6747 |
68- note: `f32::EPSILON` and `f64::EPSILON` are available.
69- --> $DIR/float_cmp_const.rs:28:5
70- |
71- LL | v == ONE;
72- | ^^^^^^^^
48+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
7349
7450error: strict comparison of `f32` or `f64` constant
7551 --> $DIR/float_cmp_const.rs:29:5
7652 |
7753LL | v != ONE;
7854 | ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() > error`
7955 |
80- note: `f32::EPSILON` and `f64::EPSILON` are available.
81- --> $DIR/float_cmp_const.rs:29:5
82- |
83- LL | v != ONE;
84- | ^^^^^^^^
56+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
8557
8658error: strict comparison of `f32` or `f64` constant arrays
8759 --> $DIR/float_cmp_const.rs:61:5
8860 |
8961LL | NON_ZERO_ARRAY == NON_ZERO_ARRAY2;
9062 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9163 |
92- = note: `std:: f32::EPSILON` and `std:: f64::EPSILON` are available.
64+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
9365
9466error: aborting due to 8 previous errors
9567
0 commit comments