11error: redundant guard
2- --> tests/ui/redundant_guards.rs:34:20
2+ --> tests/ui/redundant_guards.rs:22:14
33 |
4- LL | C(x, y) if let 1 = y => .. ,
5- | ^ ^^^^^^^^
4+ LL | x if x == 0.0 => todo!() ,
5+ | ^^^^^^^^
66 |
77 = note: `-D clippy::redundant-guards` implied by `-D warnings`
88 = help: to override `-D warnings` add `#[allow(clippy::redundant_guards)]`
99help: try
1010 |
11+ LL - x if x == 0.0 => todo!(),
12+ LL + 0.0 => todo!(),
13+ |
14+
15+ error: redundant guard
16+ --> tests/ui/redundant_guards.rs:28:14
17+ |
18+ LL | x if x == FloatWrapper(0.0) => todo!(),
19+ | ^^^^^^^^^^^^^^^^^^^^^^
20+ |
21+ help: try
22+ |
23+ LL - x if x == FloatWrapper(0.0) => todo!(),
24+ LL + FloatWrapper(0.0) => todo!(),
25+ |
26+
27+ error: redundant guard
28+ --> tests/ui/redundant_guards.rs:43:20
29+ |
30+ LL | C(x, y) if let 1 = y => ..,
31+ | ^^^^^^^^^
32+ |
33+ help: try
34+ |
1135LL - C(x, y) if let 1 = y => ..,
1236LL + C(x, 1) => ..,
1337 |
1438
1539error: redundant guard
16- --> tests/ui/redundant_guards.rs:40 :20
40+ --> tests/ui/redundant_guards.rs:49 :20
1741 |
1842LL | Some(x) if matches!(x, Some(1) if true) => ..,
1943 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,7 +48,7 @@ LL | Some(Some(1)) if true => ..,
2448 | ~~~~~~~ ~~~~~~~
2549
2650error: redundant guard
27- --> tests/ui/redundant_guards.rs:41 :20
51+ --> tests/ui/redundant_guards.rs:50 :20
2852 |
2953LL | Some(x) if matches!(x, Some(1)) => {
3054 | ^^^^^^^^^^^^^^^^^^^^
@@ -36,7 +60,7 @@ LL + Some(Some(1)) => {
3660 |
3761
3862error: redundant guard
39- --> tests/ui/redundant_guards.rs:45 :20
63+ --> tests/ui/redundant_guards.rs:54 :20
4064 |
4165LL | Some(x) if let Some(1) = x => ..,
4266 | ^^^^^^^^^^^^^^^
@@ -48,7 +72,7 @@ LL + Some(Some(1)) => ..,
4872 |
4973
5074error: redundant guard
51- --> tests/ui/redundant_guards.rs:46 :20
75+ --> tests/ui/redundant_guards.rs:55 :20
5276 |
5377LL | Some(x) if x == Some(2) => ..,
5478 | ^^^^^^^^^^^^
@@ -60,7 +84,7 @@ LL + Some(Some(2)) => ..,
6084 |
6185
6286error: redundant guard
63- --> tests/ui/redundant_guards.rs:47 :20
87+ --> tests/ui/redundant_guards.rs:56 :20
6488 |
6589LL | Some(x) if Some(2) == x => ..,
6690 | ^^^^^^^^^^^^
@@ -72,7 +96,7 @@ LL + Some(Some(2)) => ..,
7296 |
7397
7498error: redundant guard
75- --> tests/ui/redundant_guards.rs:72 :20
99+ --> tests/ui/redundant_guards.rs:81 :20
76100 |
77101LL | B { e } if matches!(e, Some(A(2))) => ..,
78102 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,7 +108,7 @@ LL + B { e: Some(A(2)) } => ..,
84108 |
85109
86110error: redundant guard
87- --> tests/ui/redundant_guards.rs:109 :20
111+ --> tests/ui/redundant_guards.rs:118 :20
88112 |
89113LL | E::A(y) if y == "not from an or pattern" => {},
90114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -96,7 +120,7 @@ LL + E::A("not from an or pattern") => {},
96120 |
97121
98122error: redundant guard
99- --> tests/ui/redundant_guards.rs:116 :14
123+ --> tests/ui/redundant_guards.rs:125 :14
100124 |
101125LL | x if matches!(x, Some(0)) => ..,
102126 | ^^^^^^^^^^^^^^^^^^^^
@@ -108,7 +132,7 @@ LL + Some(0) => ..,
108132 |
109133
110134error: redundant guard
111- --> tests/ui/redundant_guards.rs:123 :14
135+ --> tests/ui/redundant_guards.rs:132 :14
112136 |
113137LL | i if i == -1 => {},
114138 | ^^^^^^^
@@ -120,7 +144,7 @@ LL + -1 => {},
120144 |
121145
122146error: redundant guard
123- --> tests/ui/redundant_guards.rs:124 :14
147+ --> tests/ui/redundant_guards.rs:133 :14
124148 |
125149LL | i if i == 1 => {},
126150 | ^^^^^^
@@ -132,7 +156,7 @@ LL + 1 => {},
132156 |
133157
134158error: redundant guard
135- --> tests/ui/redundant_guards.rs:186 :28
159+ --> tests/ui/redundant_guards.rs:195 :28
136160 |
137161LL | Some(ref x) if x == &1 => {},
138162 | ^^^^^^^
@@ -144,7 +168,7 @@ LL + Some(1) => {},
144168 |
145169
146170error: redundant guard
147- --> tests/ui/redundant_guards.rs:187 :28
171+ --> tests/ui/redundant_guards.rs:196 :28
148172 |
149173LL | Some(ref x) if &1 == x => {},
150174 | ^^^^^^^
@@ -156,7 +180,7 @@ LL + Some(1) => {},
156180 |
157181
158182error: redundant guard
159- --> tests/ui/redundant_guards.rs:188 :28
183+ --> tests/ui/redundant_guards.rs:197 :28
160184 |
161185LL | Some(ref x) if let &2 = x => {},
162186 | ^^^^^^^^^^
@@ -168,7 +192,7 @@ LL + Some(2) => {},
168192 |
169193
170194error: redundant guard
171- --> tests/ui/redundant_guards.rs:189 :28
195+ --> tests/ui/redundant_guards.rs:198 :28
172196 |
173197LL | Some(ref x) if matches!(x, &3) => {},
174198 | ^^^^^^^^^^^^^^^
@@ -180,7 +204,7 @@ LL + Some(3) => {},
180204 |
181205
182206error: redundant guard
183- --> tests/ui/redundant_guards.rs:209 :32
207+ --> tests/ui/redundant_guards.rs:218 :32
184208 |
185209LL | B { ref c, .. } if c == &1 => {},
186210 | ^^^^^^^
@@ -192,7 +216,7 @@ LL + B { c: 1, .. } => {},
192216 |
193217
194218error: redundant guard
195- --> tests/ui/redundant_guards.rs:210 :32
219+ --> tests/ui/redundant_guards.rs:219 :32
196220 |
197221LL | B { ref c, .. } if &1 == c => {},
198222 | ^^^^^^^
@@ -204,7 +228,7 @@ LL + B { c: 1, .. } => {},
204228 |
205229
206230error: redundant guard
207- --> tests/ui/redundant_guards.rs:211 :32
231+ --> tests/ui/redundant_guards.rs:220 :32
208232 |
209233LL | B { ref c, .. } if let &1 = c => {},
210234 | ^^^^^^^^^^
@@ -216,7 +240,7 @@ LL + B { c: 1, .. } => {},
216240 |
217241
218242error: redundant guard
219- --> tests/ui/redundant_guards.rs:212 :32
243+ --> tests/ui/redundant_guards.rs:221 :32
220244 |
221245LL | B { ref c, .. } if matches!(c, &1) => {},
222246 | ^^^^^^^^^^^^^^^
@@ -228,7 +252,7 @@ LL + B { c: 1, .. } => {},
228252 |
229253
230254error: redundant guard
231- --> tests/ui/redundant_guards.rs:222 :26
255+ --> tests/ui/redundant_guards.rs:231 :26
232256 |
233257LL | Some(Some(x)) if x.is_empty() => {},
234258 | ^^^^^^^^^^^^
@@ -240,7 +264,7 @@ LL + Some(Some("")) => {},
240264 |
241265
242266error: redundant guard
243- --> tests/ui/redundant_guards.rs:233 :26
267+ --> tests/ui/redundant_guards.rs:242 :26
244268 |
245269LL | Some(Some(x)) if x.is_empty() => {},
246270 | ^^^^^^^^^^^^
@@ -252,7 +276,7 @@ LL + Some(Some([])) => {},
252276 |
253277
254278error: redundant guard
255- --> tests/ui/redundant_guards.rs:238 :26
279+ --> tests/ui/redundant_guards.rs:247 :26
256280 |
257281LL | Some(Some(x)) if x.is_empty() => {},
258282 | ^^^^^^^^^^^^
@@ -264,7 +288,7 @@ LL + Some(Some([])) => {},
264288 |
265289
266290error: redundant guard
267- --> tests/ui/redundant_guards.rs:249 :26
291+ --> tests/ui/redundant_guards.rs:258 :26
268292 |
269293LL | Some(Some(x)) if x.starts_with(&[]) => {},
270294 | ^^^^^^^^^^^^^^^^^^
@@ -276,7 +300,7 @@ LL + Some(Some([..])) => {},
276300 |
277301
278302error: redundant guard
279- --> tests/ui/redundant_guards.rs:254 :26
303+ --> tests/ui/redundant_guards.rs:263 :26
280304 |
281305LL | Some(Some(x)) if x.starts_with(&[1]) => {},
282306 | ^^^^^^^^^^^^^^^^^^^
@@ -288,7 +312,7 @@ LL + Some(Some([1, ..])) => {},
288312 |
289313
290314error: redundant guard
291- --> tests/ui/redundant_guards.rs:259 :26
315+ --> tests/ui/redundant_guards.rs:268 :26
292316 |
293317LL | Some(Some(x)) if x.starts_with(&[1, 2]) => {},
294318 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -300,7 +324,7 @@ LL + Some(Some([1, 2, ..])) => {},
300324 |
301325
302326error: redundant guard
303- --> tests/ui/redundant_guards.rs:264 :26
327+ --> tests/ui/redundant_guards.rs:273 :26
304328 |
305329LL | Some(Some(x)) if x.ends_with(&[1, 2]) => {},
306330 | ^^^^^^^^^^^^^^^^^^^^
@@ -312,7 +336,7 @@ LL + Some(Some([.., 1, 2])) => {},
312336 |
313337
314338error: redundant guard
315- --> tests/ui/redundant_guards.rs:286 :18
339+ --> tests/ui/redundant_guards.rs:295 :18
316340 |
317341LL | y if y.is_empty() => {},
318342 | ^^^^^^^^^^^^
@@ -324,7 +348,7 @@ LL + "" => {},
324348 |
325349
326350error: redundant guard
327- --> tests/ui/redundant_guards.rs:305 :22
351+ --> tests/ui/redundant_guards.rs:314 :22
328352 |
329353LL | y if y.is_empty() => {},
330354 | ^^^^^^^^^^^^
@@ -335,5 +359,5 @@ LL - y if y.is_empty() => {},
335359LL + "" => {},
336360 |
337361
338- error: aborting due to 28 previous errors
362+ error: aborting due to 30 previous errors
339363
0 commit comments