1
1
error: this boolean expression can be simplified
2
- --> tests/ui/nonminimal_bool.rs:20 :13
2
+ --> tests/ui/nonminimal_bool.rs:19 :13
3
3
|
4
4
LL | let _ = !true;
5
5
| ^^^^^ help: try: `false`
@@ -8,43 +8,43 @@ LL | let _ = !true;
8
8
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`
9
9
10
10
error: this boolean expression can be simplified
11
- --> tests/ui/nonminimal_bool.rs:23 :13
11
+ --> tests/ui/nonminimal_bool.rs:22 :13
12
12
|
13
13
LL | let _ = !false;
14
14
| ^^^^^^ help: try: `true`
15
15
16
16
error: this boolean expression can be simplified
17
- --> tests/ui/nonminimal_bool.rs:25 :13
17
+ --> tests/ui/nonminimal_bool.rs:24 :13
18
18
|
19
19
LL | let _ = !!a;
20
20
| ^^^ help: try: `a`
21
21
22
22
error: this boolean expression can be simplified
23
- --> tests/ui/nonminimal_bool.rs:27 :13
23
+ --> tests/ui/nonminimal_bool.rs:26 :13
24
24
|
25
25
LL | let _ = false || a;
26
26
| ^^^^^^^^^^ help: try: `a`
27
27
28
28
error: this boolean expression can be simplified
29
- --> tests/ui/nonminimal_bool.rs:32 :13
29
+ --> tests/ui/nonminimal_bool.rs:31 :13
30
30
|
31
31
LL | let _ = !(!a && b);
32
32
| ^^^^^^^^^^ help: try: `a || !b`
33
33
34
34
error: this boolean expression can be simplified
35
- --> tests/ui/nonminimal_bool.rs:34 :13
35
+ --> tests/ui/nonminimal_bool.rs:33 :13
36
36
|
37
37
LL | let _ = !(!a || b);
38
38
| ^^^^^^^^^^ help: try: `a && !b`
39
39
40
40
error: this boolean expression can be simplified
41
- --> tests/ui/nonminimal_bool.rs:36 :13
41
+ --> tests/ui/nonminimal_bool.rs:35 :13
42
42
|
43
43
LL | let _ = !a && !(b && c);
44
44
| ^^^^^^^^^^^^^^^ help: try: `!(a || b && c)`
45
45
46
46
error: this boolean expression can be simplified
47
- --> tests/ui/nonminimal_bool.rs:45 :13
47
+ --> tests/ui/nonminimal_bool.rs:44 :13
48
48
|
49
49
LL | let _ = a == b && c == 5 && a == b;
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -57,7 +57,7 @@ LL | let _ = a == b && c == 5;
57
57
| ~~~~~~~~~~~~~~~~
58
58
59
59
error: this boolean expression can be simplified
60
- --> tests/ui/nonminimal_bool.rs:47 :13
60
+ --> tests/ui/nonminimal_bool.rs:46 :13
61
61
|
62
62
LL | let _ = a == b || c == 5 || a == b;
63
63
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -70,7 +70,7 @@ LL | let _ = a == b || c == 5;
70
70
| ~~~~~~~~~~~~~~~~
71
71
72
72
error: this boolean expression can be simplified
73
- --> tests/ui/nonminimal_bool.rs:49 :13
73
+ --> tests/ui/nonminimal_bool.rs:48 :13
74
74
|
75
75
LL | let _ = a == b && c == 5 && b == a;
76
76
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ LL | let _ = a == b && c == 5;
83
83
| ~~~~~~~~~~~~~~~~
84
84
85
85
error: this boolean expression can be simplified
86
- --> tests/ui/nonminimal_bool.rs:51 :13
86
+ --> tests/ui/nonminimal_bool.rs:50 :13
87
87
|
88
88
LL | let _ = a != b || !(a != b || c == d);
89
89
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -96,7 +96,7 @@ LL | let _ = a != b || c != d;
96
96
| ~~~~~~~~~~~~~~~~
97
97
98
98
error: this boolean expression can be simplified
99
- --> tests/ui/nonminimal_bool.rs:53 :13
99
+ --> tests/ui/nonminimal_bool.rs:52 :13
100
100
|
101
101
LL | let _ = a != b && !(a != b && c == d);
102
102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -109,43 +109,43 @@ LL | let _ = a != b && c != d;
109
109
| ~~~~~~~~~~~~~~~~
110
110
111
111
error: this boolean expression can be simplified
112
- --> tests/ui/nonminimal_bool.rs:84 :8
112
+ --> tests/ui/nonminimal_bool.rs:83 :8
113
113
|
114
114
LL | if matches!(true, true) && true {
115
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(true, true)`
116
116
117
117
error: this boolean expression can be simplified
118
- --> tests/ui/nonminimal_bool.rs:164 :8
118
+ --> tests/ui/nonminimal_bool.rs:163 :8
119
119
|
120
120
LL | if !(12 == a) {}
121
121
| ^^^^^^^^^^ help: try: `12 != a`
122
122
123
123
error: this boolean expression can be simplified
124
- --> tests/ui/nonminimal_bool.rs:165 :8
124
+ --> tests/ui/nonminimal_bool.rs:164 :8
125
125
|
126
126
LL | if !(a == 12) {}
127
127
| ^^^^^^^^^^ help: try: `a != 12`
128
128
129
129
error: this boolean expression can be simplified
130
- --> tests/ui/nonminimal_bool.rs:166 :8
130
+ --> tests/ui/nonminimal_bool.rs:165 :8
131
131
|
132
132
LL | if !(12 != a) {}
133
133
| ^^^^^^^^^^ help: try: `12 == a`
134
134
135
135
error: this boolean expression can be simplified
136
- --> tests/ui/nonminimal_bool.rs:167 :8
136
+ --> tests/ui/nonminimal_bool.rs:166 :8
137
137
|
138
138
LL | if !(a != 12) {}
139
139
| ^^^^^^^^^^ help: try: `a == 12`
140
140
141
141
error: this boolean expression can be simplified
142
- --> tests/ui/nonminimal_bool.rs:171 :8
142
+ --> tests/ui/nonminimal_bool.rs:170 :8
143
143
|
144
144
LL | if !b == true {}
145
145
| ^^^^^^^^^^ help: try: `b != true`
146
146
147
147
error: this comparison might be written more concisely
148
- --> tests/ui/nonminimal_bool.rs:171 :8
148
+ --> tests/ui/nonminimal_bool.rs:170 :8
149
149
|
150
150
LL | if !b == true {}
151
151
| ^^^^^^^^^^ help: try simplifying it as shown: `b != true`
@@ -154,61 +154,61 @@ LL | if !b == true {}
154
154
= help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`
155
155
156
156
error: equality checks against true are unnecessary
157
- --> tests/ui/nonminimal_bool.rs:171 :8
157
+ --> tests/ui/nonminimal_bool.rs:170 :8
158
158
|
159
159
LL | if !b == true {}
160
160
| ^^^^^^^^^^ help: try simplifying it as shown: `!b`
161
161
162
162
error: this boolean expression can be simplified
163
- --> tests/ui/nonminimal_bool.rs:172 :8
163
+ --> tests/ui/nonminimal_bool.rs:171 :8
164
164
|
165
165
LL | if !b != true {}
166
166
| ^^^^^^^^^^ help: try: `b == true`
167
167
168
168
error: inequality checks against true can be replaced by a negation
169
- --> tests/ui/nonminimal_bool.rs:172 :8
169
+ --> tests/ui/nonminimal_bool.rs:171 :8
170
170
|
171
171
LL | if !b != true {}
172
172
| ^^^^^^^^^^ help: try simplifying it as shown: `!(!b)`
173
173
174
174
error: this boolean expression can be simplified
175
- --> tests/ui/nonminimal_bool.rs:173 :8
175
+ --> tests/ui/nonminimal_bool.rs:172 :8
176
176
|
177
177
LL | if true == !b {}
178
178
| ^^^^^^^^^^ help: try: `true != b`
179
179
180
180
error: this comparison might be written more concisely
181
- --> tests/ui/nonminimal_bool.rs:173 :8
181
+ --> tests/ui/nonminimal_bool.rs:172 :8
182
182
|
183
183
LL | if true == !b {}
184
184
| ^^^^^^^^^^ help: try simplifying it as shown: `true != b`
185
185
186
186
error: equality checks against true are unnecessary
187
- --> tests/ui/nonminimal_bool.rs:173 :8
187
+ --> tests/ui/nonminimal_bool.rs:172 :8
188
188
|
189
189
LL | if true == !b {}
190
190
| ^^^^^^^^^^ help: try simplifying it as shown: `!b`
191
191
192
192
error: this boolean expression can be simplified
193
- --> tests/ui/nonminimal_bool.rs:174 :8
193
+ --> tests/ui/nonminimal_bool.rs:173 :8
194
194
|
195
195
LL | if true != !b {}
196
196
| ^^^^^^^^^^ help: try: `true == b`
197
197
198
198
error: inequality checks against true can be replaced by a negation
199
- --> tests/ui/nonminimal_bool.rs:174 :8
199
+ --> tests/ui/nonminimal_bool.rs:173 :8
200
200
|
201
201
LL | if true != !b {}
202
202
| ^^^^^^^^^^ help: try simplifying it as shown: `!(!b)`
203
203
204
204
error: this boolean expression can be simplified
205
- --> tests/ui/nonminimal_bool.rs:175 :8
205
+ --> tests/ui/nonminimal_bool.rs:174 :8
206
206
|
207
207
LL | if !b == !c {}
208
208
| ^^^^^^^^ help: try: `b == c`
209
209
210
210
error: this boolean expression can be simplified
211
- --> tests/ui/nonminimal_bool.rs:176 :8
211
+ --> tests/ui/nonminimal_bool.rs:175 :8
212
212
|
213
213
LL | if !b != !c {}
214
214
| ^^^^^^^^ help: try: `b != c`
0 commit comments