You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/float_cmp.stderr
+6-6
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
error: strict comparison of `f32` or `f64`
2
-
--> $DIR/float_cmp.rs:57:5
2
+
--> $DIR/float_cmp.rs:70:5
3
3
|
4
4
LL | ONE as f64 != 2.0;
5
5
| ^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(ONE as f64 - 2.0).abs() > error_margin`
@@ -8,39 +8,39 @@ LL | ONE as f64 != 2.0;
8
8
= note: `-D clippy::float-cmp` implied by `-D warnings`
9
9
10
10
error: strict comparison of `f32` or `f64`
11
-
--> $DIR/float_cmp.rs:64:5
11
+
--> $DIR/float_cmp.rs:77:5
12
12
|
13
13
LL | x == 1.0;
14
14
| ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 1.0).abs() < error_margin`
15
15
|
16
16
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
17
17
18
18
error: strict comparison of `f32` or `f64`
19
-
--> $DIR/float_cmp.rs:69:5
19
+
--> $DIR/float_cmp.rs:82:5
20
20
|
21
21
LL | twice(x) != twice(ONE as f64);
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(twice(x) - twice(ONE as f64)).abs() > error_margin`
23
23
|
24
24
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
25
25
26
26
error: strict comparison of `f32` or `f64`
27
-
--> $DIR/float_cmp.rs:91:5
27
+
--> $DIR/float_cmp.rs:104:5
28
28
|
29
29
LL | NON_ZERO_ARRAY[i] == NON_ZERO_ARRAY[j];
30
30
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(NON_ZERO_ARRAY[i] - NON_ZERO_ARRAY[j]).abs() < error_margin`
31
31
|
32
32
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
33
33
34
34
error: strict comparison of `f32` or `f64` arrays
35
-
--> $DIR/float_cmp.rs:98:5
35
+
--> $DIR/float_cmp.rs:111:5
36
36
|
37
37
LL | a1 == a2;
38
38
| ^^^^^^^^
39
39
|
40
40
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
41
41
42
42
error: strict comparison of `f32` or `f64`
43
-
--> $DIR/float_cmp.rs:101:5
43
+
--> $DIR/float_cmp.rs:114:5
44
44
|
45
45
LL | a1[0] == a2[0];
46
46
| ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(a1[0] - a2[0]).abs() < error_margin`
0 commit comments