1
1
error: unreachable pattern
2
- --> $DIR/match-empty-exhaustive_patterns.rs:47 :9
2
+ --> $DIR/match-empty-exhaustive_patterns.rs:48 :9
3
3
|
4
4
LL | _ => {},
5
5
| ^
6
6
|
7
7
note: the lint level is defined here
8
- --> $DIR/match-empty-exhaustive_patterns.rs:3 :9
8
+ --> $DIR/match-empty-exhaustive_patterns.rs:4 :9
9
9
|
10
10
LL | #![deny(unreachable_patterns)]
11
11
| ^^^^^^^^^^^^^^^^^^^^
12
12
13
13
error: unreachable pattern
14
- --> $DIR/match-empty-exhaustive_patterns.rs:50 :9
14
+ --> $DIR/match-empty-exhaustive_patterns.rs:51 :9
15
15
|
16
16
LL | _ if false => {},
17
17
| ^
18
18
19
19
error: unreachable pattern
20
- --> $DIR/match-empty-exhaustive_patterns.rs:57:9
20
+ --> $DIR/match-empty-exhaustive_patterns.rs:58:9
21
+ |
22
+ LL | _ => {},
23
+ | ^
24
+
25
+ error: unreachable pattern
26
+ --> $DIR/match-empty-exhaustive_patterns.rs:61:9
27
+ |
28
+ LL | _ if false => {},
29
+ | ^
30
+
31
+ error: unreachable pattern
32
+ --> $DIR/match-empty-exhaustive_patterns.rs:68:9
21
33
|
22
34
LL | Some(_) => {}
23
35
| ^^^^^^^
24
36
25
37
error: unreachable pattern
26
- --> $DIR/match-empty-exhaustive_patterns.rs:61 :9
38
+ --> $DIR/match-empty-exhaustive_patterns.rs:72 :9
27
39
|
28
40
LL | Some(_) => {}
29
41
| ^^^^^^^
30
42
31
43
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
32
- --> $DIR/match-empty-exhaustive_patterns.rs:64 :18
44
+ --> $DIR/match-empty-exhaustive_patterns.rs:75 :18
33
45
|
34
46
LL | match_empty!(0u8);
35
47
| ^^^
@@ -38,7 +50,7 @@ LL | match_empty!(0u8);
38
50
= note: the matched value is of type `u8`
39
51
40
52
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
41
- --> $DIR/match-empty-exhaustive_patterns.rs:66 :18
53
+ --> $DIR/match-empty-exhaustive_patterns.rs:77 :18
42
54
|
43
55
LL | struct NonEmptyStruct(bool);
44
56
| ---------------------------- `NonEmptyStruct` defined here
@@ -50,7 +62,7 @@ LL | match_empty!(NonEmptyStruct(true));
50
62
= note: the matched value is of type `NonEmptyStruct`
51
63
52
64
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
53
- --> $DIR/match-empty-exhaustive_patterns.rs:68 :18
65
+ --> $DIR/match-empty-exhaustive_patterns.rs:79 :18
54
66
|
55
67
LL | / union NonEmptyUnion1 {
56
68
LL | | foo: (),
@@ -64,7 +76,7 @@ LL | match_empty!((NonEmptyUnion1 { foo: () }));
64
76
= note: the matched value is of type `NonEmptyUnion1`
65
77
66
78
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
67
- --> $DIR/match-empty-exhaustive_patterns.rs:70 :18
79
+ --> $DIR/match-empty-exhaustive_patterns.rs:81 :18
68
80
|
69
81
LL | / union NonEmptyUnion2 {
70
82
LL | | foo: (),
@@ -79,7 +91,7 @@ LL | match_empty!((NonEmptyUnion2 { foo: () }));
79
91
= note: the matched value is of type `NonEmptyUnion2`
80
92
81
93
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
82
- --> $DIR/match-empty-exhaustive_patterns.rs:72 :18
94
+ --> $DIR/match-empty-exhaustive_patterns.rs:83 :18
83
95
|
84
96
LL | / enum NonEmptyEnum1 {
85
97
LL | | Foo(bool),
@@ -96,7 +108,7 @@ LL | match_empty!(NonEmptyEnum1::Foo(true));
96
108
= note: the matched value is of type `NonEmptyEnum1`
97
109
98
110
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
99
- --> $DIR/match-empty-exhaustive_patterns.rs:74 :18
111
+ --> $DIR/match-empty-exhaustive_patterns.rs:85 :18
100
112
|
101
113
LL | / enum NonEmptyEnum2 {
102
114
LL | | Foo(bool),
@@ -117,7 +129,7 @@ LL | match_empty!(NonEmptyEnum2::Foo(true));
117
129
= note: the matched value is of type `NonEmptyEnum2`
118
130
119
131
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
120
- --> $DIR/match-empty-exhaustive_patterns.rs:76 :18
132
+ --> $DIR/match-empty-exhaustive_patterns.rs:87 :18
121
133
|
122
134
LL | / enum NonEmptyEnum5 {
123
135
LL | | V1, V2, V3, V4, V5,
@@ -131,7 +143,7 @@ LL | match_empty!(NonEmptyEnum5::V1);
131
143
= note: the matched value is of type `NonEmptyEnum5`
132
144
133
145
error[E0004]: non-exhaustive patterns: `_` not covered
134
- --> $DIR/match-empty-exhaustive_patterns.rs:79 :18
146
+ --> $DIR/match-empty-exhaustive_patterns.rs:90 :18
135
147
|
136
148
LL | match_false!(0u8);
137
149
| ^^^ pattern `_` not covered
@@ -140,7 +152,7 @@ LL | match_false!(0u8);
140
152
= note: the matched value is of type `u8`
141
153
142
154
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
143
- --> $DIR/match-empty-exhaustive_patterns.rs:81 :18
155
+ --> $DIR/match-empty-exhaustive_patterns.rs:92 :18
144
156
|
145
157
LL | struct NonEmptyStruct(bool);
146
158
| ---------------------------- `NonEmptyStruct` defined here
@@ -152,7 +164,7 @@ LL | match_false!(NonEmptyStruct(true));
152
164
= note: the matched value is of type `NonEmptyStruct`
153
165
154
166
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
155
- --> $DIR/match-empty-exhaustive_patterns.rs:83 :18
167
+ --> $DIR/match-empty-exhaustive_patterns.rs:94 :18
156
168
|
157
169
LL | / union NonEmptyUnion1 {
158
170
LL | | foo: (),
@@ -166,7 +178,7 @@ LL | match_false!((NonEmptyUnion1 { foo: () }));
166
178
= note: the matched value is of type `NonEmptyUnion1`
167
179
168
180
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
169
- --> $DIR/match-empty-exhaustive_patterns.rs:85 :18
181
+ --> $DIR/match-empty-exhaustive_patterns.rs:96 :18
170
182
|
171
183
LL | / union NonEmptyUnion2 {
172
184
LL | | foo: (),
@@ -181,7 +193,7 @@ LL | match_false!((NonEmptyUnion2 { foo: () }));
181
193
= note: the matched value is of type `NonEmptyUnion2`
182
194
183
195
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
184
- --> $DIR/match-empty-exhaustive_patterns.rs:87 :18
196
+ --> $DIR/match-empty-exhaustive_patterns.rs:98 :18
185
197
|
186
198
LL | / enum NonEmptyEnum1 {
187
199
LL | | Foo(bool),
@@ -198,7 +210,7 @@ LL | match_false!(NonEmptyEnum1::Foo(true));
198
210
= note: the matched value is of type `NonEmptyEnum1`
199
211
200
212
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
201
- --> $DIR/match-empty-exhaustive_patterns.rs:89 :18
213
+ --> $DIR/match-empty-exhaustive_patterns.rs:100 :18
202
214
|
203
215
LL | / enum NonEmptyEnum2 {
204
216
LL | | Foo(bool),
@@ -219,7 +231,7 @@ LL | match_false!(NonEmptyEnum2::Foo(true));
219
231
= note: the matched value is of type `NonEmptyEnum2`
220
232
221
233
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
222
- --> $DIR/match-empty-exhaustive_patterns.rs:91 :18
234
+ --> $DIR/match-empty-exhaustive_patterns.rs:102 :18
223
235
|
224
236
LL | / enum NonEmptyEnum5 {
225
237
LL | | V1, V2, V3, V4, V5,
@@ -232,6 +244,6 @@ LL | match_false!(NonEmptyEnum5::V1);
232
244
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
233
245
= note: the matched value is of type `NonEmptyEnum5`
234
246
235
- error: aborting due to 18 previous errors
247
+ error: aborting due to 20 previous errors
236
248
237
249
For more information about this error, try `rustc --explain E0004`.
0 commit comments