11error: strict comparison of `f32` or `f64`
2- --> tests/ui-toml/float_cmp/test.rs:15 :21
2+ --> tests/ui-toml/float_cmp/test.rs:17 :21
33 |
44LL | let _ = x == y;
55 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
@@ -11,130 +11,130 @@ LL | #![deny(clippy::float_cmp)]
1111 | ^^^^^^^^^^^^^^^^^
1212
1313error: strict comparison of `f32` or `f64`
14- --> tests/ui-toml/float_cmp/test.rs:16 :21
14+ --> tests/ui-toml/float_cmp/test.rs:18 :21
1515 |
1616LL | let _ = x != y;
1717 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
1818
1919error: strict comparison of `f32` or `f64`
20- --> tests/ui-toml/float_cmp/test.rs:17 :21
20+ --> tests/ui-toml/float_cmp/test.rs:19 :21
2121 |
2222LL | let _ = x == 5.5;
2323 | ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
2424
2525error: strict comparison of `f32` or `f64`
26- --> tests/ui-toml/float_cmp/test.rs:18 :21
26+ --> tests/ui-toml/float_cmp/test.rs:20 :21
2727 |
2828LL | let _ = 5.5 == x;
2929 | ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
3030
3131error: strict comparison of `f32` or `f64`
32- --> tests/ui-toml/float_cmp/test.rs:41 :21
32+ --> tests/ui-toml/float_cmp/test.rs:43 :21
3333 |
3434LL | let _ = x == y;
3535 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
3636
3737error: strict comparison of `f32` or `f64`
38- --> tests/ui-toml/float_cmp/test.rs:42 :21
38+ --> tests/ui-toml/float_cmp/test.rs:44 :21
3939 |
4040LL | let _ = x != y;
4141 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
4242
4343error: strict comparison of `f32` or `f64`
44- --> tests/ui-toml/float_cmp/test.rs:43 :21
44+ --> tests/ui-toml/float_cmp/test.rs:45 :21
4545 |
4646LL | let _ = x == 5.5;
4747 | ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
4848
4949error: strict comparison of `f32` or `f64`
50- --> tests/ui-toml/float_cmp/test.rs:44 :21
50+ --> tests/ui-toml/float_cmp/test.rs:46 :21
5151 |
5252LL | let _ = 5.5 == x;
5353 | ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
5454
5555error: strict comparison of `f32` or `f64` arrays
56- --> tests/ui-toml/float_cmp/test.rs:67 :21
56+ --> tests/ui-toml/float_cmp/test.rs:69 :21
5757 |
5858LL | let _ = x == y;
5959 | ^^^^^^
6060
6161error: strict comparison of `f32` or `f64` arrays
62- --> tests/ui-toml/float_cmp/test.rs:68 :21
62+ --> tests/ui-toml/float_cmp/test.rs:70 :21
6363 |
6464LL | let _ = x == [5.5; 4];
6565 | ^^^^^^^^^^^^^
6666
6767error: strict comparison of `f32` or `f64` arrays
68- --> tests/ui-toml/float_cmp/test.rs:69 :21
68+ --> tests/ui-toml/float_cmp/test.rs:71 :21
6969 |
7070LL | let _ = [5.5; 4] == x;
7171 | ^^^^^^^^^^^^^
7272
7373error: strict comparison of `f32` or `f64` arrays
74- --> tests/ui-toml/float_cmp/test.rs:70 :21
74+ --> tests/ui-toml/float_cmp/test.rs:72 :21
7575 |
7676LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
7777 | ^^^^^^^^^^^^^^^^^^^^^^^^^
7878
7979error: strict comparison of `f32` or `f64` arrays
80- --> tests/ui-toml/float_cmp/test.rs:71 :21
80+ --> tests/ui-toml/float_cmp/test.rs:73 :21
8181 |
8282LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
8383 | ^^^^^^^^^^^^^^^^^^^^^^^^^
8484
8585error: strict comparison of `f32` or `f64` arrays
86- --> tests/ui-toml/float_cmp/test.rs:87 :21
86+ --> tests/ui-toml/float_cmp/test.rs:89 :21
8787 |
8888LL | let _ = x == y;
8989 | ^^^^^^
9090
9191error: strict comparison of `f32` or `f64` arrays
92- --> tests/ui-toml/float_cmp/test.rs:88 :21
92+ --> tests/ui-toml/float_cmp/test.rs:90 :21
9393 |
9494LL | let _ = x == [5.5; 4];
9595 | ^^^^^^^^^^^^^
9696
9797error: strict comparison of `f32` or `f64` arrays
98- --> tests/ui-toml/float_cmp/test.rs:89 :21
98+ --> tests/ui-toml/float_cmp/test.rs:91 :21
9999 |
100100LL | let _ = [5.5; 4] == x;
101101 | ^^^^^^^^^^^^^
102102
103103error: strict comparison of `f32` or `f64` arrays
104- --> tests/ui-toml/float_cmp/test.rs:90 :21
104+ --> tests/ui-toml/float_cmp/test.rs:92 :21
105105 |
106106LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
107107 | ^^^^^^^^^^^^^^^^^^^^^^^^^
108108
109109error: strict comparison of `f32` or `f64` arrays
110- --> tests/ui-toml/float_cmp/test.rs:91 :21
110+ --> tests/ui-toml/float_cmp/test.rs:93 :21
111111 |
112112LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
113113 | ^^^^^^^^^^^^^^^^^^^^^^^^^
114114
115115error: strict comparison of `f32` or `f64`
116- --> tests/ui-toml/float_cmp/test.rs:109 :21
116+ --> tests/ui-toml/float_cmp/test.rs:111 :21
117117 |
118118LL | let _ = x == y;
119119 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
120120
121121error: strict comparison of `f32` or `f64` arrays
122- --> tests/ui-toml/float_cmp/test.rs:115 :21
122+ --> tests/ui-toml/float_cmp/test.rs:117 :21
123123 |
124124LL | let _ = x == y;
125125 | ^^^^^^
126126
127127error: strict comparison of `f32` or `f64`
128- --> tests/ui-toml/float_cmp/test.rs:131 :21
128+ --> tests/ui-toml/float_cmp/test.rs:132 :21
129129 |
130- LL | let _ = C * x == x * x;
131- | ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(C * x - x * x).abs() < error_margin`
130+ LL | let _ = f32::EPSILON * x == x * x;
131+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(f32::EPSILON * x - x * x).abs() < error_margin`
132132
133133error: strict comparison of `f32` or `f64`
134- --> tests/ui-toml/float_cmp/test.rs:132 :21
134+ --> tests/ui-toml/float_cmp/test.rs:133 :21
135135 |
136- LL | let _ = x * x == C * x;
137- | ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(x * x - C * x).abs() < error_margin`
136+ LL | let _ = x * x == f32::EPSILON * x;
137+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(x * x - f32::EPSILON * x).abs() < error_margin`
138138
139139error: strict comparison of `f32` or `f64`
140140 --> tests/ui-toml/float_cmp/test.rs:158:17
0 commit comments