1
1
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
2
- --> $DIR/empty-match.rs:46 :20
2
+ --> $DIR/empty-match.rs:47 :20
3
3
|
4
4
LL | match_no_arms!(0u8);
5
5
| ^^^
@@ -8,7 +8,7 @@ LL | match_no_arms!(0u8);
8
8
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
9
9
10
10
error[E0004]: non-exhaustive patterns: type `i8` is non-empty
11
- --> $DIR/empty-match.rs:47 :20
11
+ --> $DIR/empty-match.rs:48 :20
12
12
|
13
13
LL | match_no_arms!(0i8);
14
14
| ^^^
@@ -17,7 +17,7 @@ LL | match_no_arms!(0i8);
17
17
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
18
18
19
19
error[E0004]: non-exhaustive patterns: type `usize` is non-empty
20
- --> $DIR/empty-match.rs:48 :20
20
+ --> $DIR/empty-match.rs:49 :20
21
21
|
22
22
LL | match_no_arms!(0usize);
23
23
| ^^^^^^
@@ -26,7 +26,7 @@ LL | match_no_arms!(0usize);
26
26
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
27
27
28
28
error[E0004]: non-exhaustive patterns: type `isize` is non-empty
29
- --> $DIR/empty-match.rs:49 :20
29
+ --> $DIR/empty-match.rs:50 :20
30
30
|
31
31
LL | match_no_arms!(0isize);
32
32
| ^^^^^^
@@ -35,7 +35,7 @@ LL | match_no_arms!(0isize);
35
35
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
36
36
37
37
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
38
- --> $DIR/empty-match.rs:50 :20
38
+ --> $DIR/empty-match.rs:51 :20
39
39
|
40
40
LL | match_no_arms!(NonEmptyStruct1);
41
41
| ^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | struct NonEmptyStruct1;
49
49
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
50
50
51
51
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
52
- --> $DIR/empty-match.rs:51 :20
52
+ --> $DIR/empty-match.rs:52 :20
53
53
|
54
54
LL | match_no_arms!(NonEmptyStruct2(true));
55
55
| ^^^^^^^^^^^^^^^^^^^^^
@@ -63,7 +63,7 @@ LL | struct NonEmptyStruct2(bool);
63
63
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
64
64
65
65
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
66
- --> $DIR/empty-match.rs:52 :20
66
+ --> $DIR/empty-match.rs:53 :20
67
67
|
68
68
LL | match_no_arms!((NonEmptyUnion1 { foo: () }));
69
69
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -77,7 +77,7 @@ LL | union NonEmptyUnion1 {
77
77
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
78
78
79
79
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
80
- --> $DIR/empty-match.rs:53 :20
80
+ --> $DIR/empty-match.rs:54 :20
81
81
|
82
82
LL | match_no_arms!((NonEmptyUnion2 { foo: () }));
83
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -91,7 +91,7 @@ LL | union NonEmptyUnion2 {
91
91
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
92
92
93
93
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
94
- --> $DIR/empty-match.rs:54 :20
94
+ --> $DIR/empty-match.rs:55 :20
95
95
|
96
96
LL | match_no_arms!(NonEmptyEnum1::Foo(true));
97
97
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
@@ -107,7 +107,7 @@ LL | Foo(bool),
107
107
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
108
108
109
109
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
110
- --> $DIR/empty-match.rs:55 :20
110
+ --> $DIR/empty-match.rs:56 :20
111
111
|
112
112
LL | match_no_arms!(NonEmptyEnum2::Foo(true));
113
113
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
@@ -125,7 +125,7 @@ LL | Bar,
125
125
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
126
126
127
127
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
128
- --> $DIR/empty-match.rs:56 :20
128
+ --> $DIR/empty-match.rs:57 :20
129
129
|
130
130
LL | match_no_arms!(NonEmptyEnum5::V1);
131
131
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -148,8 +148,26 @@ LL | V5,
148
148
= note: the matched value is of type `NonEmptyEnum5`
149
149
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
150
150
151
+ error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
152
+ --> $DIR/empty-match.rs:58:20
153
+ |
154
+ LL | match_no_arms!(array0_of_empty);
155
+ | ^^^^^^^^^^^^^^^
156
+ |
157
+ = note: the matched value is of type `[!; 0]`
158
+ = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
159
+
160
+ error[E0004]: non-exhaustive patterns: type `[!; N]` is non-empty
161
+ --> $DIR/empty-match.rs:59:20
162
+ |
163
+ LL | match_no_arms!(arrayN_of_empty);
164
+ | ^^^^^^^^^^^^^^^
165
+ |
166
+ = note: the matched value is of type `[!; N]`
167
+ = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
168
+
151
169
error[E0004]: non-exhaustive patterns: `0_u8..=u8::MAX` not covered
152
- --> $DIR/empty-match.rs:58 :24
170
+ --> $DIR/empty-match.rs:61 :24
153
171
|
154
172
LL | match_guarded_arm!(0u8);
155
173
| ^^^ pattern `0_u8..=u8::MAX` not covered
@@ -163,7 +181,7 @@ LL + 0_u8..=u8::MAX => todo!()
163
181
|
164
182
165
183
error[E0004]: non-exhaustive patterns: `i8::MIN..=i8::MAX` not covered
166
- --> $DIR/empty-match.rs:59 :24
184
+ --> $DIR/empty-match.rs:62 :24
167
185
|
168
186
LL | match_guarded_arm!(0i8);
169
187
| ^^^ pattern `i8::MIN..=i8::MAX` not covered
@@ -177,7 +195,7 @@ LL + i8::MIN..=i8::MAX => todo!()
177
195
|
178
196
179
197
error[E0004]: non-exhaustive patterns: `0_usize..` not covered
180
- --> $DIR/empty-match.rs:60 :24
198
+ --> $DIR/empty-match.rs:63 :24
181
199
|
182
200
LL | match_guarded_arm!(0usize);
183
201
| ^^^^^^ pattern `0_usize..` not covered
@@ -191,7 +209,7 @@ LL + 0_usize.. => todo!()
191
209
|
192
210
193
211
error[E0004]: non-exhaustive patterns: `_` not covered
194
- --> $DIR/empty-match.rs:61 :24
212
+ --> $DIR/empty-match.rs:64 :24
195
213
|
196
214
LL | match_guarded_arm!(0isize);
197
215
| ^^^^^^ pattern `_` not covered
@@ -205,7 +223,7 @@ LL + _ => todo!()
205
223
|
206
224
207
225
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
208
- --> $DIR/empty-match.rs:62 :24
226
+ --> $DIR/empty-match.rs:65 :24
209
227
|
210
228
LL | match_guarded_arm!(NonEmptyStruct1);
211
229
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
@@ -224,7 +242,7 @@ LL + NonEmptyStruct1 => todo!()
224
242
|
225
243
226
244
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
227
- --> $DIR/empty-match.rs:63 :24
245
+ --> $DIR/empty-match.rs:66 :24
228
246
|
229
247
LL | match_guarded_arm!(NonEmptyStruct2(true));
230
248
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
@@ -243,7 +261,7 @@ LL + NonEmptyStruct2(_) => todo!()
243
261
|
244
262
245
263
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
246
- --> $DIR/empty-match.rs:64 :24
264
+ --> $DIR/empty-match.rs:67 :24
247
265
|
248
266
LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
249
267
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
@@ -262,7 +280,7 @@ LL + NonEmptyUnion1 { .. } => todo!()
262
280
|
263
281
264
282
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
265
- --> $DIR/empty-match.rs:65 :24
283
+ --> $DIR/empty-match.rs:68 :24
266
284
|
267
285
LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
268
286
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
@@ -282,7 +300,7 @@ LL + NonEmptyUnion2 { .. } => todo!()
282
300
|
283
301
284
302
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
285
- --> $DIR/empty-match.rs:66 :24
303
+ --> $DIR/empty-match.rs:69 :24
286
304
|
287
305
LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
288
306
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
@@ -303,7 +321,7 @@ LL + NonEmptyEnum1::Foo(_) => todo!()
303
321
|
304
322
305
323
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
306
- --> $DIR/empty-match.rs:67 :24
324
+ --> $DIR/empty-match.rs:70 :24
307
325
|
308
326
LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
309
327
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
@@ -326,7 +344,7 @@ LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
326
344
|
327
345
328
346
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
329
- --> $DIR/empty-match.rs:68 :24
347
+ --> $DIR/empty-match.rs:71 :24
330
348
|
331
349
LL | match_guarded_arm!(NonEmptyEnum5::V1);
332
350
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -354,6 +372,34 @@ LL ~ _ if false => {},
354
372
LL + _ => todo!()
355
373
|
356
374
357
- error: aborting due to 22 previous errors
375
+ error[E0004]: non-exhaustive patterns: `[]` not covered
376
+ --> $DIR/empty-match.rs:72:24
377
+ |
378
+ LL | match_guarded_arm!(array0_of_empty);
379
+ | ^^^^^^^^^^^^^^^ pattern `[]` not covered
380
+ |
381
+ = note: the matched value is of type `[!; 0]`
382
+ = note: match arms with guards don't count towards exhaustivity
383
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
384
+ |
385
+ LL ~ _ if false => {},
386
+ LL + [] => todo!()
387
+ |
388
+
389
+ error[E0004]: non-exhaustive patterns: `[]` not covered
390
+ --> $DIR/empty-match.rs:73:24
391
+ |
392
+ LL | match_guarded_arm!(arrayN_of_empty);
393
+ | ^^^^^^^^^^^^^^^ pattern `[]` not covered
394
+ |
395
+ = note: the matched value is of type `[!; N]`
396
+ = note: match arms with guards don't count towards exhaustivity
397
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
398
+ |
399
+ LL ~ _ if false => {},
400
+ LL + [] => todo!()
401
+ |
402
+
403
+ error: aborting due to 26 previous errors
358
404
359
405
For more information about this error, try `rustc --explain E0004`.
0 commit comments