@@ -86,70 +86,82 @@ LL | if x > y {
86
86
| ^^^^^ help: try simplifying it as shown: `x & !y`
87
87
88
88
error: this comparison might be written more concisely
89
- --> tests/ui/bool_comparison.rs:135 :8
89
+ --> tests/ui/bool_comparison.rs:133 :8
90
90
|
91
91
LL | if a == !b {};
92
92
| ^^^^^^^ help: try simplifying it as shown: `a != b`
93
93
94
94
error: this comparison might be written more concisely
95
- --> tests/ui/bool_comparison.rs:137 :8
95
+ --> tests/ui/bool_comparison.rs:135 :8
96
96
|
97
97
LL | if !a == b {};
98
98
| ^^^^^^^ help: try simplifying it as shown: `a != b`
99
99
100
100
error: this comparison might be written more concisely
101
- --> tests/ui/bool_comparison.rs:142 :8
101
+ --> tests/ui/bool_comparison.rs:140 :8
102
102
|
103
103
LL | if b == !a {};
104
104
| ^^^^^^^ help: try simplifying it as shown: `b != a`
105
105
106
106
error: this comparison might be written more concisely
107
- --> tests/ui/bool_comparison.rs:144 :8
107
+ --> tests/ui/bool_comparison.rs:142 :8
108
108
|
109
109
LL | if !b == a {};
110
110
| ^^^^^^^ help: try simplifying it as shown: `b != a`
111
111
112
112
error: equality checks against false can be replaced by a negation
113
- --> tests/ui/bool_comparison.rs:169 :8
113
+ --> tests/ui/bool_comparison.rs:166 :8
114
114
|
115
115
LL | if false == m!(func) {}
116
116
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
117
117
118
118
error: equality checks against false can be replaced by a negation
119
- --> tests/ui/bool_comparison.rs:171 :8
119
+ --> tests/ui/bool_comparison.rs:168 :8
120
120
|
121
121
LL | if m!(func) == false {}
122
122
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
123
123
124
124
error: equality checks against true are unnecessary
125
- --> tests/ui/bool_comparison.rs:173 :8
125
+ --> tests/ui/bool_comparison.rs:170 :8
126
126
|
127
127
LL | if true == m!(func) {}
128
128
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
129
129
130
130
error: equality checks against true are unnecessary
131
- --> tests/ui/bool_comparison.rs:175 :8
131
+ --> tests/ui/bool_comparison.rs:172 :8
132
132
|
133
133
LL | if m!(func) == true {}
134
134
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
135
135
136
136
error: equality checks against false can be replaced by a negation
137
- --> tests/ui/bool_comparison.rs:193 :14
137
+ --> tests/ui/bool_comparison.rs:190 :14
138
138
|
139
139
LL | let _ = ((1 < 2) == false) as usize;
140
140
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `1 >= 2`
141
141
142
142
error: equality checks against false can be replaced by a negation
143
- --> tests/ui/bool_comparison.rs:195 :14
143
+ --> tests/ui/bool_comparison.rs:192 :14
144
144
|
145
145
LL | let _ = (false == m!(func)) as usize;
146
146
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
147
147
148
148
error: this comparison might be written more concisely
149
- --> tests/ui/bool_comparison.rs:199 :14
149
+ --> tests/ui/bool_comparison.rs:196 :14
150
150
|
151
151
LL | let _ = ((1 < 2) == !m!(func)) as usize;
152
152
| ^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `(1 < 2) != m!(func)`
153
153
154
- error: aborting due to 25 previous errors
154
+ error: order comparisons between booleans can be simplified
155
+ --> tests/ui/bool_comparison.rs:206:9
156
+ |
157
+ LL | x > m!(func)
158
+ | ^^^^^^^^^^^^ help: try simplifying it as shown: `x & !m!(func)`
159
+
160
+ error: order comparisons between booleans can be simplified
161
+ --> tests/ui/bool_comparison.rs:211:9
162
+ |
163
+ LL | x < m!(func)
164
+ | ^^^^^^^^^^^^ help: try simplifying it as shown: `!x & m!(func)`
165
+
166
+ error: aborting due to 27 previous errors
155
167
0 commit comments