@@ -5,91 +5,63 @@ LL | 1f32 == ONE;
5
5
| ^^^^^^^^^^^ help: consider comparing them within some error: `(1f32 - ONE).abs() < error`
6
6
|
7
7
= 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`
13
9
14
10
error: strict comparison of `f32` or `f64` constant
15
11
--> $DIR/float_cmp_const.rs:21:5
16
12
|
17
13
LL | TWO == ONE;
18
14
| ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() < error`
19
15
|
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`
25
17
26
18
error: strict comparison of `f32` or `f64` constant
27
19
--> $DIR/float_cmp_const.rs:22:5
28
20
|
29
21
LL | TWO != ONE;
30
22
| ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() > error`
31
23
|
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`
37
25
38
26
error: strict comparison of `f32` or `f64` constant
39
27
--> $DIR/float_cmp_const.rs:23:5
40
28
|
41
29
LL | ONE + ONE == TWO;
42
30
| ^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE + ONE - TWO).abs() < error`
43
31
|
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`
49
33
50
34
error: strict comparison of `f32` or `f64` constant
51
35
--> $DIR/float_cmp_const.rs:25:5
52
36
|
53
37
LL | x as f32 == ONE;
54
38
| ^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(x as f32 - ONE).abs() < error`
55
39
|
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`
61
41
62
42
error: strict comparison of `f32` or `f64` constant
63
43
--> $DIR/float_cmp_const.rs:28:5
64
44
|
65
45
LL | v == ONE;
66
46
| ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() < error`
67
47
|
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`
73
49
74
50
error: strict comparison of `f32` or `f64` constant
75
51
--> $DIR/float_cmp_const.rs:29:5
76
52
|
77
53
LL | v != ONE;
78
54
| ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() > error`
79
55
|
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`
85
57
86
58
error: strict comparison of `f32` or `f64` constant arrays
87
59
--> $DIR/float_cmp_const.rs:61:5
88
60
|
89
61
LL | NON_ZERO_ARRAY == NON_ZERO_ARRAY2;
90
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91
63
|
92
- = note: `std:: f32::EPSILON` and `std:: f64::EPSILON` are available.
64
+ = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
93
65
94
66
error: aborting due to 8 previous errors
95
67
0 commit comments