1 error: unreachable pattern
2 --> $DIR/empty-match.rs:37:9
7 note: the lint level is defined here
8 --> $DIR/empty-match.rs:8:9
10 LL | #![deny(unreachable_patterns)]
11 | ^^^^^^^^^^^^^^^^^^^^
13 error: unreachable pattern
14 --> $DIR/empty-match.rs:40:9
16 LL | _ if false => {},
19 error: unreachable pattern
20 --> $DIR/empty-match.rs:47:9
25 error: unreachable pattern
26 --> $DIR/empty-match.rs:50:9
28 LL | _ if false => {},
31 error: unreachable pattern
32 --> $DIR/empty-match.rs:57:9
37 error: unreachable pattern
38 --> $DIR/empty-match.rs:60:9
40 LL | _ if false => {},
43 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
44 --> $DIR/empty-match.rs:78:20
46 LL | match_no_arms!(0u8);
49 = note: the matched value is of type `u8`
50 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
52 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
53 --> $DIR/empty-match.rs:79:20
55 LL | match_no_arms!(NonEmptyStruct1);
58 note: `NonEmptyStruct1` defined here
59 --> $DIR/empty-match.rs:14:8
61 LL | struct NonEmptyStruct1;
63 = note: the matched value is of type `NonEmptyStruct1`
64 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
66 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
67 --> $DIR/empty-match.rs:80:20
69 LL | match_no_arms!(NonEmptyStruct2(true));
70 | ^^^^^^^^^^^^^^^^^^^^^
72 note: `NonEmptyStruct2` defined here
73 --> $DIR/empty-match.rs:15:8
75 LL | struct NonEmptyStruct2(bool);
77 = note: the matched value is of type `NonEmptyStruct2`
78 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
80 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
81 --> $DIR/empty-match.rs:81:20
83 LL | match_no_arms!((NonEmptyUnion1 { foo: () }));
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 note: `NonEmptyUnion1` defined here
87 --> $DIR/empty-match.rs:16:7
89 LL | union NonEmptyUnion1 {
91 = note: the matched value is of type `NonEmptyUnion1`
92 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
94 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
95 --> $DIR/empty-match.rs:82:20
97 LL | match_no_arms!((NonEmptyUnion2 { foo: () }));
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100 note: `NonEmptyUnion2` defined here
101 --> $DIR/empty-match.rs:19:7
103 LL | union NonEmptyUnion2 {
105 = note: the matched value is of type `NonEmptyUnion2`
106 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
108 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
109 --> $DIR/empty-match.rs:83:20
111 LL | match_no_arms!(NonEmptyEnum1::Foo(true));
112 | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
114 note: `NonEmptyEnum1` defined here
115 --> $DIR/empty-match.rs:24:5
117 LL | enum NonEmptyEnum1 {
121 = note: the matched value is of type `NonEmptyEnum1`
122 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
124 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
125 --> $DIR/empty-match.rs:84:20
127 LL | match_no_arms!(NonEmptyEnum2::Foo(true));
128 | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
130 note: `NonEmptyEnum2` defined here
131 --> $DIR/empty-match.rs:27:5
133 LL | enum NonEmptyEnum2 {
139 = note: the matched value is of type `NonEmptyEnum2`
140 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
142 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
143 --> $DIR/empty-match.rs:85:20
145 LL | match_no_arms!(NonEmptyEnum5::V1);
146 | ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
148 note: `NonEmptyEnum5` defined here
149 --> $DIR/empty-match.rs:30:6
151 LL | enum NonEmptyEnum5 {
153 = note: the matched value is of type `NonEmptyEnum5`
154 = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
156 error[E0004]: non-exhaustive patterns: `_` not covered
157 --> $DIR/empty-match.rs:87:24
159 LL | match_guarded_arm!(0u8);
160 | ^^^ pattern `_` not covered
162 = note: the matched value is of type `u8`
163 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
165 LL ~ _ if false => {}
169 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
170 --> $DIR/empty-match.rs:88:24
172 LL | match_guarded_arm!(NonEmptyStruct1);
173 | ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
175 note: `NonEmptyStruct1` defined here
176 --> $DIR/empty-match.rs:14:8
178 LL | struct NonEmptyStruct1;
180 = note: the matched value is of type `NonEmptyStruct1`
181 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
183 LL ~ _ if false => {}
184 LL + NonEmptyStruct1 => todo!()
187 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
188 --> $DIR/empty-match.rs:89:24
190 LL | match_guarded_arm!(NonEmptyStruct2(true));
191 | ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
193 note: `NonEmptyStruct2` defined here
194 --> $DIR/empty-match.rs:15:8
196 LL | struct NonEmptyStruct2(bool);
198 = note: the matched value is of type `NonEmptyStruct2`
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
201 LL ~ _ if false => {}
202 LL + NonEmptyStruct2(_) => todo!()
205 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
206 --> $DIR/empty-match.rs:90:24
208 LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
211 note: `NonEmptyUnion1` defined here
212 --> $DIR/empty-match.rs:16:7
214 LL | union NonEmptyUnion1 {
216 = note: the matched value is of type `NonEmptyUnion1`
217 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
219 LL ~ _ if false => {}
220 LL + NonEmptyUnion1 { .. } => todo!()
223 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
224 --> $DIR/empty-match.rs:91:24
226 LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
227 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
229 note: `NonEmptyUnion2` defined here
230 --> $DIR/empty-match.rs:19:7
232 LL | union NonEmptyUnion2 {
234 = note: the matched value is of type `NonEmptyUnion2`
235 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
237 LL ~ _ if false => {}
238 LL + NonEmptyUnion2 { .. } => todo!()
241 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
242 --> $DIR/empty-match.rs:92:24
244 LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
245 | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
247 note: `NonEmptyEnum1` defined here
248 --> $DIR/empty-match.rs:24:5
250 LL | enum NonEmptyEnum1 {
254 = note: the matched value is of type `NonEmptyEnum1`
255 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
257 LL ~ _ if false => {}
258 LL + NonEmptyEnum1::Foo(_) => todo!()
261 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
262 --> $DIR/empty-match.rs:93:24
264 LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
265 | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
267 note: `NonEmptyEnum2` defined here
268 --> $DIR/empty-match.rs:27:5
270 LL | enum NonEmptyEnum2 {
276 = note: the matched value is of type `NonEmptyEnum2`
277 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
279 LL ~ _ if false => {}
280 LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
283 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
284 --> $DIR/empty-match.rs:94:24
286 LL | match_guarded_arm!(NonEmptyEnum5::V1);
287 | ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
289 note: `NonEmptyEnum5` defined here
290 --> $DIR/empty-match.rs:30:6
292 LL | enum NonEmptyEnum5 {
294 = note: the matched value is of type `NonEmptyEnum5`
295 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
297 LL ~ _ if false => {}
301 error: aborting due to 22 previous errors
303 For more information about this error, try `rustc --explain E0004`.