11error: this boolean expression can be simplified
2- --> tests/ui/nonminimal_bool.rs:17 :13
2+ --> tests/ui/nonminimal_bool.rs:16 :13
33 |
44LL | let _ = !true;
55 | ^^^^^
@@ -13,7 +13,7 @@ LL + let _ = false;
1313 |
1414
1515error: this boolean expression can be simplified
16- --> tests/ui/nonminimal_bool.rs:20 :13
16+ --> tests/ui/nonminimal_bool.rs:19 :13
1717 |
1818LL | let _ = !false;
1919 | ^^^^^^
@@ -25,7 +25,7 @@ LL + let _ = true;
2525 |
2626
2727error: this boolean expression can be simplified
28- --> tests/ui/nonminimal_bool.rs:23 :13
28+ --> tests/ui/nonminimal_bool.rs:22 :13
2929 |
3030LL | let _ = !!a;
3131 | ^^^
@@ -37,7 +37,7 @@ LL + let _ = a;
3737 |
3838
3939error: this boolean expression can be simplified
40- --> tests/ui/nonminimal_bool.rs:26 :13
40+ --> tests/ui/nonminimal_bool.rs:25 :13
4141 |
4242LL | let _ = false || a;
4343 | ^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + let _ = a;
4949 |
5050
5151error: this boolean expression can be simplified
52- --> tests/ui/nonminimal_bool.rs:32 :13
52+ --> tests/ui/nonminimal_bool.rs:31 :13
5353 |
5454LL | let _ = !(!a && b);
5555 | ^^^^^^^^^^
@@ -61,7 +61,7 @@ LL + let _ = a || !b;
6161 |
6262
6363error: this boolean expression can be simplified
64- --> tests/ui/nonminimal_bool.rs:35 :13
64+ --> tests/ui/nonminimal_bool.rs:34 :13
6565 |
6666LL | let _ = !(!a || b);
6767 | ^^^^^^^^^^
@@ -73,7 +73,7 @@ LL + let _ = a && !b;
7373 |
7474
7575error: this boolean expression can be simplified
76- --> tests/ui/nonminimal_bool.rs:38 :13
76+ --> tests/ui/nonminimal_bool.rs:37 :13
7777 |
7878LL | let _ = !a && !(b && c);
7979 | ^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL + let _ = !(a || b && c);
8585 |
8686
8787error: this boolean expression can be simplified
88- --> tests/ui/nonminimal_bool.rs:47 :13
88+ --> tests/ui/nonminimal_bool.rs:46 :13
8989 |
9090LL | let _ = a == b && c == 5 && a == b;
9191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -100,7 +100,7 @@ LL + let _ = a == b && c == 5;
100100 |
101101
102102error: this boolean expression can be simplified
103- --> tests/ui/nonminimal_bool.rs:50 :13
103+ --> tests/ui/nonminimal_bool.rs:49 :13
104104 |
105105LL | let _ = a == b || c == 5 || a == b;
106106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -115,7 +115,7 @@ LL + let _ = a == b || c == 5;
115115 |
116116
117117error: this boolean expression can be simplified
118- --> tests/ui/nonminimal_bool.rs:53 :13
118+ --> tests/ui/nonminimal_bool.rs:52 :13
119119 |
120120LL | let _ = a == b && c == 5 && b == a;
121121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -130,7 +130,7 @@ LL + let _ = a == b && c == 5;
130130 |
131131
132132error: this boolean expression can be simplified
133- --> tests/ui/nonminimal_bool.rs:56 :13
133+ --> tests/ui/nonminimal_bool.rs:55 :13
134134 |
135135LL | let _ = a != b || !(a != b || c == d);
136136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ LL + let _ = a != b || c != d;
145145 |
146146
147147error: this boolean expression can be simplified
148- --> tests/ui/nonminimal_bool.rs:59 :13
148+ --> tests/ui/nonminimal_bool.rs:58 :13
149149 |
150150LL | let _ = a != b && !(a != b && c == d);
151151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -160,7 +160,7 @@ LL + let _ = a != b && c != d;
160160 |
161161
162162error: this boolean expression can be simplified
163- --> tests/ui/nonminimal_bool.rs:90 :8
163+ --> tests/ui/nonminimal_bool.rs:89 :8
164164 |
165165LL | if matches!(true, true) && true {
166166 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -172,37 +172,37 @@ LL + if matches!(true, true) {
172172 |
173173
174174error: this boolean expression can be simplified
175- --> tests/ui/nonminimal_bool.rs:171 :8
175+ --> tests/ui/nonminimal_bool.rs:170 :8
176176 |
177177LL | if !(12 == a) {}
178178 | ^^^^^^^^^^ help: try: `(12 != a)`
179179
180180error: this boolean expression can be simplified
181- --> tests/ui/nonminimal_bool.rs:173 :8
181+ --> tests/ui/nonminimal_bool.rs:172 :8
182182 |
183183LL | if !(a == 12) {}
184184 | ^^^^^^^^^^ help: try: `(a != 12)`
185185
186186error: this boolean expression can be simplified
187- --> tests/ui/nonminimal_bool.rs:175 :8
187+ --> tests/ui/nonminimal_bool.rs:174 :8
188188 |
189189LL | if !(12 != a) {}
190190 | ^^^^^^^^^^ help: try: `(12 == a)`
191191
192192error: this boolean expression can be simplified
193- --> tests/ui/nonminimal_bool.rs:177 :8
193+ --> tests/ui/nonminimal_bool.rs:176 :8
194194 |
195195LL | if !(a != 12) {}
196196 | ^^^^^^^^^^ help: try: `(a == 12)`
197197
198198error: this boolean expression can be simplified
199- --> tests/ui/nonminimal_bool.rs:182 :8
199+ --> tests/ui/nonminimal_bool.rs:181 :8
200200 |
201201LL | if !b == true {}
202202 | ^^^^^^^^^^ help: try: `b != true`
203203
204204error: equality checks against true are unnecessary
205- --> tests/ui/nonminimal_bool.rs:182 :8
205+ --> tests/ui/nonminimal_bool.rs:181 :8
206206 |
207207LL | if !b == true {}
208208 | ^^^^^^^^^^ help: try: `!b`
@@ -211,55 +211,55 @@ LL | if !b == true {}
211211 = help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`
212212
213213error: this boolean expression can be simplified
214- --> tests/ui/nonminimal_bool.rs:185 :8
214+ --> tests/ui/nonminimal_bool.rs:184 :8
215215 |
216216LL | if !b != true {}
217217 | ^^^^^^^^^^ help: try: `b == true`
218218
219219error: inequality checks against true can be replaced by a negation
220- --> tests/ui/nonminimal_bool.rs:185 :8
220+ --> tests/ui/nonminimal_bool.rs:184 :8
221221 |
222222LL | if !b != true {}
223223 | ^^^^^^^^^^ help: try: `b`
224224
225225error: this boolean expression can be simplified
226- --> tests/ui/nonminimal_bool.rs:188 :8
226+ --> tests/ui/nonminimal_bool.rs:187 :8
227227 |
228228LL | if true == !b {}
229229 | ^^^^^^^^^^ help: try: `true != b`
230230
231231error: equality checks against true are unnecessary
232- --> tests/ui/nonminimal_bool.rs:188 :8
232+ --> tests/ui/nonminimal_bool.rs:187 :8
233233 |
234234LL | if true == !b {}
235235 | ^^^^^^^^^^ help: try: `!b`
236236
237237error: this boolean expression can be simplified
238- --> tests/ui/nonminimal_bool.rs:191 :8
238+ --> tests/ui/nonminimal_bool.rs:190 :8
239239 |
240240LL | if true != !b {}
241241 | ^^^^^^^^^^ help: try: `true == b`
242242
243243error: inequality checks against true can be replaced by a negation
244- --> tests/ui/nonminimal_bool.rs:191 :8
244+ --> tests/ui/nonminimal_bool.rs:190 :8
245245 |
246246LL | if true != !b {}
247247 | ^^^^^^^^^^ help: try: `b`
248248
249249error: this boolean expression can be simplified
250- --> tests/ui/nonminimal_bool.rs:194 :8
250+ --> tests/ui/nonminimal_bool.rs:193 :8
251251 |
252252LL | if !b == !c {}
253253 | ^^^^^^^^ help: try: `b == c`
254254
255255error: this boolean expression can be simplified
256- --> tests/ui/nonminimal_bool.rs:196 :8
256+ --> tests/ui/nonminimal_bool.rs:195 :8
257257 |
258258LL | if !b != !c {}
259259 | ^^^^^^^^ help: try: `b != c`
260260
261261error: this boolean expression can be simplified
262- --> tests/ui/nonminimal_bool.rs:212 :8
262+ --> tests/ui/nonminimal_bool.rs:211 :8
263263 |
264264LL | if !(a < 2.0 && !b) {
265265 | ^^^^^^^^^^^^^^^^
@@ -271,7 +271,7 @@ LL + if a >= 2.0 || b {
271271 |
272272
273273error: this boolean expression can be simplified
274- --> tests/ui/nonminimal_bool.rs:231 :12
274+ --> tests/ui/nonminimal_bool.rs:230 :12
275275 |
276276LL | if !(matches!(ty, TyKind::Ref(_, _, _)) && !is_mutable(&expr)) {
277277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -283,13 +283,13 @@ LL + if !matches!(ty, TyKind::Ref(_, _, _)) || is_mutable(&expr) {
283283 |
284284
285285error: this boolean expression can be simplified
286- --> tests/ui/nonminimal_bool.rs:251 :8
286+ --> tests/ui/nonminimal_bool.rs:250 :8
287287 |
288288LL | if !S != true {}
289289 | ^^^^^^^^^^ help: try: `S == true`
290290
291291error: inequality checks against true can be replaced by a negation
292- --> tests/ui/nonminimal_bool.rs:251 :8
292+ --> tests/ui/nonminimal_bool.rs:250 :8
293293 |
294294LL | if !S != true {}
295295 | ^^^^^^^^^^ help: try: `!!S`
0 commit comments