1
1
error: 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
3
3
|
4
4
LL | let _ = x == y;
5
5
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
@@ -11,130 +11,130 @@ LL | #![deny(clippy::float_cmp)]
11
11
| ^^^^^^^^^^^^^^^^^
12
12
13
13
error: 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
15
15
|
16
16
LL | let _ = x != y;
17
17
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
18
18
19
19
error: 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
21
21
|
22
22
LL | let _ = x == 5.5;
23
23
| ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
24
24
25
25
error: 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
27
27
|
28
28
LL | let _ = 5.5 == x;
29
29
| ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
30
30
31
31
error: 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
33
33
|
34
34
LL | let _ = x == y;
35
35
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
36
36
37
37
error: 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
39
39
|
40
40
LL | let _ = x != y;
41
41
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
42
42
43
43
error: 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
45
45
|
46
46
LL | let _ = x == 5.5;
47
47
| ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
48
48
49
49
error: 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
51
51
|
52
52
LL | let _ = 5.5 == x;
53
53
| ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
54
54
55
55
error: 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
57
57
|
58
58
LL | let _ = x == y;
59
59
| ^^^^^^
60
60
61
61
error: 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
63
63
|
64
64
LL | let _ = x == [5.5; 4];
65
65
| ^^^^^^^^^^^^^
66
66
67
67
error: 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
69
69
|
70
70
LL | let _ = [5.5; 4] == x;
71
71
| ^^^^^^^^^^^^^
72
72
73
73
error: 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
75
75
|
76
76
LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
77
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^
78
78
79
79
error: 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
81
81
|
82
82
LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
83
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^
84
84
85
85
error: 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
87
87
|
88
88
LL | let _ = x == y;
89
89
| ^^^^^^
90
90
91
91
error: 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
93
93
|
94
94
LL | let _ = x == [5.5; 4];
95
95
| ^^^^^^^^^^^^^
96
96
97
97
error: 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
99
99
|
100
100
LL | let _ = [5.5; 4] == x;
101
101
| ^^^^^^^^^^^^^
102
102
103
103
error: 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
105
105
|
106
106
LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
107
107
| ^^^^^^^^^^^^^^^^^^^^^^^^^
108
108
109
109
error: 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
111
111
|
112
112
LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
113
113
| ^^^^^^^^^^^^^^^^^^^^^^^^^
114
114
115
115
error: 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
117
117
|
118
118
LL | let _ = x == y;
119
119
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
120
120
121
121
error: 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
123
123
|
124
124
LL | let _ = x == y;
125
125
| ^^^^^^
126
126
127
127
error: 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
129
129
|
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`
132
132
133
133
error: 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
135
135
|
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`
138
138
139
139
error: strict comparison of `f32` or `f64`
140
140
--> tests/ui-toml/float_cmp/test.rs:158:17
0 commit comments