@@ -176,14 +176,15 @@ LL | match_guarded_arm!(0u8);
176
176
| ^^^ pattern `_` not covered
177
177
|
178
178
= note: the matched value is of type `u8`
179
+ = note: match arms with guards don't count towards exhaustivity
179
180
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
180
181
|
181
182
LL ~ _ if false => {},
182
183
LL + _ => todo!()
183
184
|
184
185
185
186
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
186
- --> $DIR/empty-match.rs:133 :24
187
+ --> $DIR/empty-match.rs:134 :24
187
188
|
188
189
LL | match_guarded_arm!(NonEmptyStruct1);
189
190
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
@@ -194,14 +195,15 @@ note: `NonEmptyStruct1` defined here
194
195
LL | struct NonEmptyStruct1;
195
196
| ^^^^^^^^^^^^^^^
196
197
= note: the matched value is of type `NonEmptyStruct1`
198
+ = note: match arms with guards don't count towards exhaustivity
197
199
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
198
200
|
199
201
LL ~ _ if false => {},
200
202
LL + NonEmptyStruct1 => todo!()
201
203
|
202
204
203
205
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
204
- --> $DIR/empty-match.rs:137 :24
206
+ --> $DIR/empty-match.rs:139 :24
205
207
|
206
208
LL | match_guarded_arm!(NonEmptyStruct2(true));
207
209
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
@@ -212,14 +214,15 @@ note: `NonEmptyStruct2` defined here
212
214
LL | struct NonEmptyStruct2(bool);
213
215
| ^^^^^^^^^^^^^^^
214
216
= note: the matched value is of type `NonEmptyStruct2`
217
+ = note: match arms with guards don't count towards exhaustivity
215
218
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
216
219
|
217
220
LL ~ _ if false => {},
218
221
LL + NonEmptyStruct2(_) => todo!()
219
222
|
220
223
221
224
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
222
- --> $DIR/empty-match.rs:141 :24
225
+ --> $DIR/empty-match.rs:144 :24
223
226
|
224
227
LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
225
228
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
@@ -230,14 +233,15 @@ note: `NonEmptyUnion1` defined here
230
233
LL | union NonEmptyUnion1 {
231
234
| ^^^^^^^^^^^^^^
232
235
= note: the matched value is of type `NonEmptyUnion1`
236
+ = note: match arms with guards don't count towards exhaustivity
233
237
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
234
238
|
235
239
LL ~ _ if false => {},
236
240
LL + NonEmptyUnion1 { .. } => todo!()
237
241
|
238
242
239
243
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
240
- --> $DIR/empty-match.rs:145 :24
244
+ --> $DIR/empty-match.rs:149 :24
241
245
|
242
246
LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
243
247
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
@@ -248,14 +252,15 @@ note: `NonEmptyUnion2` defined here
248
252
LL | union NonEmptyUnion2 {
249
253
| ^^^^^^^^^^^^^^
250
254
= note: the matched value is of type `NonEmptyUnion2`
255
+ = note: match arms with guards don't count towards exhaustivity
251
256
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
252
257
|
253
258
LL ~ _ if false => {},
254
259
LL + NonEmptyUnion2 { .. } => todo!()
255
260
|
256
261
257
262
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
258
- --> $DIR/empty-match.rs:149 :24
263
+ --> $DIR/empty-match.rs:154 :24
259
264
|
260
265
LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
261
266
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
@@ -268,14 +273,15 @@ LL | enum NonEmptyEnum1 {
268
273
LL | Foo(bool),
269
274
| ^^^ not covered
270
275
= note: the matched value is of type `NonEmptyEnum1`
276
+ = note: match arms with guards don't count towards exhaustivity
271
277
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
272
278
|
273
279
LL ~ _ if false => {},
274
280
LL + NonEmptyEnum1::Foo(_) => todo!()
275
281
|
276
282
277
283
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
278
- --> $DIR/empty-match.rs:153 :24
284
+ --> $DIR/empty-match.rs:159 :24
279
285
|
280
286
LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
281
287
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
@@ -291,14 +297,15 @@ LL | Foo(bool),
291
297
LL | Bar,
292
298
| ^^^ not covered
293
299
= note: the matched value is of type `NonEmptyEnum2`
300
+ = note: match arms with guards don't count towards exhaustivity
294
301
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
295
302
|
296
303
LL ~ _ if false => {},
297
304
LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
298
305
|
299
306
300
307
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
301
- --> $DIR/empty-match.rs:157 :24
308
+ --> $DIR/empty-match.rs:164 :24
302
309
|
303
310
LL | match_guarded_arm!(NonEmptyEnum5::V1);
304
311
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -309,6 +316,7 @@ note: `NonEmptyEnum5` defined here
309
316
LL | enum NonEmptyEnum5 {
310
317
| ^^^^^^^^^^^^^
311
318
= note: the matched value is of type `NonEmptyEnum5`
319
+ = note: match arms with guards don't count towards exhaustivity
312
320
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
313
321
|
314
322
LL ~ _ if false => {},
0 commit comments