1- error[E0004]: non-exhaustive patterns: `_` not covered
2- --> $DIR/match-empty.rs:49:11
1+ error: unreachable pattern
2+ --> $DIR/match-empty.rs:47:9
33 |
4- LL | enum Foo {}
5- | ----------- `Foo` defined here
6- ...
7- LL | match x {
8- | ^ pattern `_` not covered
4+ LL | _ => {},
5+ | ^
96 |
10- = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
11- = note: the matched value is of type `Foo`
7+ note: the lint level is defined here
8+ --> $DIR/match-empty.rs:3:9
9+ |
10+ LL | #![deny(unreachable_patterns)]
11+ | ^^^^^^^^^^^^^^^^^^^^
1212
13- error[E0004]: non-exhaustive patterns: `_` not covered
14- --> $DIR/match-empty.rs:60:11
13+ error: unreachable pattern
14+ --> $DIR/match-empty.rs:50:9
1515 |
16- LL | match x {
17- | ^ pattern `_` not covered
16+ LL | _ if false => {},
17+ | ^
18+
19+ error: unreachable pattern
20+ --> $DIR/match-empty.rs:57:9
1821 |
19- = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
20- = note: the matched value is of type `!`
22+ LL | _ => {},
23+ | ^
24+
25+ error: unreachable pattern
26+ --> $DIR/match-empty.rs:60:9
27+ |
28+ LL | _ if false => {},
29+ | ^
2130
2231error[E0004]: non-exhaustive patterns: type `u8` is non-empty
23- --> $DIR/match-empty.rs:77 :18
32+ --> $DIR/match-empty.rs:75 :18
2433 |
2534LL | match_empty!(0u8);
2635 | ^^^
@@ -29,7 +38,7 @@ LL | match_empty!(0u8);
2938 = note: the matched value is of type `u8`
3039
3140error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
32- --> $DIR/match-empty.rs:79 :18
41+ --> $DIR/match-empty.rs:77 :18
3342 |
3443LL | struct NonEmptyStruct(bool);
3544 | ---------------------------- `NonEmptyStruct` defined here
@@ -41,7 +50,7 @@ LL | match_empty!(NonEmptyStruct(true));
4150 = note: the matched value is of type `NonEmptyStruct`
4251
4352error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
44- --> $DIR/match-empty.rs:81 :18
53+ --> $DIR/match-empty.rs:79 :18
4554 |
4655LL | / union NonEmptyUnion1 {
4756LL | | foo: (),
@@ -55,7 +64,7 @@ LL | match_empty!((NonEmptyUnion1 { foo: () }));
5564 = note: the matched value is of type `NonEmptyUnion1`
5665
5766error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
58- --> $DIR/match-empty.rs:83 :18
67+ --> $DIR/match-empty.rs:81 :18
5968 |
6069LL | / union NonEmptyUnion2 {
6170LL | | foo: (),
@@ -70,7 +79,7 @@ LL | match_empty!((NonEmptyUnion2 { foo: () }));
7079 = note: the matched value is of type `NonEmptyUnion2`
7180
7281error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
73- --> $DIR/match-empty.rs:85 :18
82+ --> $DIR/match-empty.rs:83 :18
7483 |
7584LL | / enum NonEmptyEnum1 {
7685LL | | Foo(bool),
@@ -87,7 +96,7 @@ LL | match_empty!(NonEmptyEnum1::Foo(true));
8796 = note: the matched value is of type `NonEmptyEnum1`
8897
8998error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
90- --> $DIR/match-empty.rs:87 :18
99+ --> $DIR/match-empty.rs:85 :18
91100 |
92101LL | / enum NonEmptyEnum2 {
93102LL | | Foo(bool),
@@ -108,7 +117,7 @@ LL | match_empty!(NonEmptyEnum2::Foo(true));
108117 = note: the matched value is of type `NonEmptyEnum2`
109118
110119error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
111- --> $DIR/match-empty.rs:89 :18
120+ --> $DIR/match-empty.rs:87 :18
112121 |
113122LL | / enum NonEmptyEnum5 {
114123LL | | V1, V2, V3, V4, V5,
@@ -122,7 +131,7 @@ LL | match_empty!(NonEmptyEnum5::V1);
122131 = note: the matched value is of type `NonEmptyEnum5`
123132
124133error[E0004]: non-exhaustive patterns: `_` not covered
125- --> $DIR/match-empty.rs:92 :18
134+ --> $DIR/match-empty.rs:90 :18
126135 |
127136LL | match_false!(0u8);
128137 | ^^^ pattern `_` not covered
@@ -131,7 +140,7 @@ LL | match_false!(0u8);
131140 = note: the matched value is of type `u8`
132141
133142error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
134- --> $DIR/match-empty.rs:94 :18
143+ --> $DIR/match-empty.rs:92 :18
135144 |
136145LL | struct NonEmptyStruct(bool);
137146 | ---------------------------- `NonEmptyStruct` defined here
@@ -143,7 +152,7 @@ LL | match_false!(NonEmptyStruct(true));
143152 = note: the matched value is of type `NonEmptyStruct`
144153
145154error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
146- --> $DIR/match-empty.rs:96 :18
155+ --> $DIR/match-empty.rs:94 :18
147156 |
148157LL | / union NonEmptyUnion1 {
149158LL | | foo: (),
@@ -157,7 +166,7 @@ LL | match_false!((NonEmptyUnion1 { foo: () }));
157166 = note: the matched value is of type `NonEmptyUnion1`
158167
159168error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
160- --> $DIR/match-empty.rs:98 :18
169+ --> $DIR/match-empty.rs:96 :18
161170 |
162171LL | / union NonEmptyUnion2 {
163172LL | | foo: (),
@@ -172,7 +181,7 @@ LL | match_false!((NonEmptyUnion2 { foo: () }));
172181 = note: the matched value is of type `NonEmptyUnion2`
173182
174183error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
175- --> $DIR/match-empty.rs:100 :18
184+ --> $DIR/match-empty.rs:98 :18
176185 |
177186LL | / enum NonEmptyEnum1 {
178187LL | | Foo(bool),
@@ -189,7 +198,7 @@ LL | match_false!(NonEmptyEnum1::Foo(true));
189198 = note: the matched value is of type `NonEmptyEnum1`
190199
191200error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
192- --> $DIR/match-empty.rs:102 :18
201+ --> $DIR/match-empty.rs:100 :18
193202 |
194203LL | / enum NonEmptyEnum2 {
195204LL | | Foo(bool),
@@ -210,7 +219,7 @@ LL | match_false!(NonEmptyEnum2::Foo(true));
210219 = note: the matched value is of type `NonEmptyEnum2`
211220
212221error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
213- --> $DIR/match-empty.rs:104 :18
222+ --> $DIR/match-empty.rs:102 :18
214223 |
215224LL | / enum NonEmptyEnum5 {
216225LL | | V1, V2, V3, V4, V5,
@@ -223,6 +232,6 @@ LL | match_false!(NonEmptyEnum5::V1);
223232 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
224233 = note: the matched value is of type `NonEmptyEnum5`
225234
226- error: aborting due to 16 previous errors
235+ error: aborting due to 18 previous errors
227236
228237For more information about this error, try `rustc --explain E0004`.
0 commit comments