]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
7235ef3fd9054a5bdded145e896e353a6b8a6431
[rust.git] / src / test / ui / pattern / usefulness / empty-match.exhaustive_patterns.stderr
1 error: unreachable pattern
2   --> $DIR/empty-match.rs:37:9
3    |
4 LL |         _ => {},
5    |         ^
6    |
7 note: the lint level is defined here
8   --> $DIR/empty-match.rs:8:9
9    |
10 LL | #![deny(unreachable_patterns)]
11    |         ^^^^^^^^^^^^^^^^^^^^
12
13 error: unreachable pattern
14   --> $DIR/empty-match.rs:40:9
15    |
16 LL |         _ if false => {},
17    |         ^
18
19 error: unreachable pattern
20   --> $DIR/empty-match.rs:47:9
21    |
22 LL |         _ => {},
23    |         ^
24
25 error: unreachable pattern
26   --> $DIR/empty-match.rs:50:9
27    |
28 LL |         _ if false => {},
29    |         ^
30
31 error: unreachable pattern
32   --> $DIR/empty-match.rs:57:9
33    |
34 LL |         _ => {},
35    |         ^
36
37 error: unreachable pattern
38   --> $DIR/empty-match.rs:60:9
39    |
40 LL |         _ if false => {},
41    |         ^
42
43 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
44   --> $DIR/empty-match.rs:78:20
45    |
46 LL |     match_no_arms!(0u8);
47    |                    ^^^
48    |
49    = note: the matched value is of type `u8`
50    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
51
52 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
53   --> $DIR/empty-match.rs:79:20
54    |
55 LL | struct NonEmptyStruct1;
56    | ----------------------- `NonEmptyStruct1` defined here
57 ...
58 LL |     match_no_arms!(NonEmptyStruct1);
59    |                    ^^^^^^^^^^^^^^^
60    |
61    = note: the matched value is of type `NonEmptyStruct1`
62    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
63
64 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
65   --> $DIR/empty-match.rs:80:20
66    |
67 LL | struct NonEmptyStruct2(bool);
68    | ----------------------------- `NonEmptyStruct2` defined here
69 ...
70 LL |     match_no_arms!(NonEmptyStruct2(true));
71    |                    ^^^^^^^^^^^^^^^^^^^^^
72    |
73    = note: the matched value is of type `NonEmptyStruct2`
74    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
75
76 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
77   --> $DIR/empty-match.rs:81:20
78    |
79 LL | / union NonEmptyUnion1 {
80 LL | |     foo: (),
81 LL | | }
82    | |_- `NonEmptyUnion1` defined here
83 ...
84 LL |       match_no_arms!((NonEmptyUnion1 { foo: () }));
85    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86    |
87    = note: the matched value is of type `NonEmptyUnion1`
88    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
89
90 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
91   --> $DIR/empty-match.rs:82:20
92    |
93 LL | / union NonEmptyUnion2 {
94 LL | |     foo: (),
95 LL | |     bar: (),
96 LL | | }
97    | |_- `NonEmptyUnion2` defined here
98 ...
99 LL |       match_no_arms!((NonEmptyUnion2 { foo: () }));
100    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101    |
102    = note: the matched value is of type `NonEmptyUnion2`
103    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
104
105 error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
106   --> $DIR/empty-match.rs:83:20
107    |
108 LL | / enum NonEmptyEnum1 {
109 LL | |     Foo(bool),
110    | |     --- not covered
111 LL | | }
112    | |_- `NonEmptyEnum1` defined here
113 ...
114 LL |       match_no_arms!(NonEmptyEnum1::Foo(true));
115    |                      ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
116    |
117    = note: the matched value is of type `NonEmptyEnum1`
118    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
119
120 error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
121   --> $DIR/empty-match.rs:84:20
122    |
123 LL | / enum NonEmptyEnum2 {
124 LL | |     Foo(bool),
125    | |     --- not covered
126 LL | |     Bar,
127    | |     --- not covered
128 LL | | }
129    | |_- `NonEmptyEnum2` defined here
130 ...
131 LL |       match_no_arms!(NonEmptyEnum2::Foo(true));
132    |                      ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
133    |
134    = note: the matched value is of type `NonEmptyEnum2`
135    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
136
137 error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
138   --> $DIR/empty-match.rs:85:20
139    |
140 LL | / enum NonEmptyEnum5 {
141 LL | |     V1, V2, V3, V4, V5,
142 LL | | }
143    | |_- `NonEmptyEnum5` defined here
144 ...
145 LL |       match_no_arms!(NonEmptyEnum5::V1);
146    |                      ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
147    |
148    = note: the matched value is of type `NonEmptyEnum5`
149    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
150
151 error[E0004]: non-exhaustive patterns: `_` not covered
152   --> $DIR/empty-match.rs:87:24
153    |
154 LL |     match_guarded_arm!(0u8);
155    |                        ^^^ pattern `_` not covered
156    |
157    = note: the matched value is of type `u8`
158 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
159    |
160 LL ~             _ if false => {}
161 LL +             _ => todo!()
162    |
163
164 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
165   --> $DIR/empty-match.rs:88:24
166    |
167 LL | struct NonEmptyStruct1;
168    | ----------------------- `NonEmptyStruct1` defined here
169 ...
170 LL |     match_guarded_arm!(NonEmptyStruct1);
171    |                        ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
172    |
173    = note: the matched value is of type `NonEmptyStruct1`
174 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
175    |
176 LL ~             _ if false => {}
177 LL +             NonEmptyStruct1 => todo!()
178    |
179
180 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
181   --> $DIR/empty-match.rs:89:24
182    |
183 LL | struct NonEmptyStruct2(bool);
184    | ----------------------------- `NonEmptyStruct2` defined here
185 ...
186 LL |     match_guarded_arm!(NonEmptyStruct2(true));
187    |                        ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
188    |
189    = note: the matched value is of type `NonEmptyStruct2`
190 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
191    |
192 LL ~             _ if false => {}
193 LL +             NonEmptyStruct2(_) => todo!()
194    |
195
196 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
197   --> $DIR/empty-match.rs:90:24
198    |
199 LL | / union NonEmptyUnion1 {
200 LL | |     foo: (),
201 LL | | }
202    | |_- `NonEmptyUnion1` defined here
203 ...
204 LL |       match_guarded_arm!((NonEmptyUnion1 { foo: () }));
205    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
206    |
207    = note: the matched value is of type `NonEmptyUnion1`
208 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
209    |
210 LL ~             _ if false => {}
211 LL +             NonEmptyUnion1 { .. } => todo!()
212    |
213
214 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
215   --> $DIR/empty-match.rs:91:24
216    |
217 LL | / union NonEmptyUnion2 {
218 LL | |     foo: (),
219 LL | |     bar: (),
220 LL | | }
221    | |_- `NonEmptyUnion2` defined here
222 ...
223 LL |       match_guarded_arm!((NonEmptyUnion2 { foo: () }));
224    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
225    |
226    = note: the matched value is of type `NonEmptyUnion2`
227 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
228    |
229 LL ~             _ if false => {}
230 LL +             NonEmptyUnion2 { .. } => todo!()
231    |
232
233 error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
234   --> $DIR/empty-match.rs:92:24
235    |
236 LL | / enum NonEmptyEnum1 {
237 LL | |     Foo(bool),
238    | |     --- not covered
239 LL | | }
240    | |_- `NonEmptyEnum1` defined here
241 ...
242 LL |       match_guarded_arm!(NonEmptyEnum1::Foo(true));
243    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
244    |
245    = note: the matched value is of type `NonEmptyEnum1`
246 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
247    |
248 LL ~             _ if false => {}
249 LL +             Foo(_) => todo!()
250    |
251
252 error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
253   --> $DIR/empty-match.rs:93:24
254    |
255 LL | / enum NonEmptyEnum2 {
256 LL | |     Foo(bool),
257    | |     --- not covered
258 LL | |     Bar,
259    | |     --- not covered
260 LL | | }
261    | |_- `NonEmptyEnum2` defined here
262 ...
263 LL |       match_guarded_arm!(NonEmptyEnum2::Foo(true));
264    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
265    |
266    = note: the matched value is of type `NonEmptyEnum2`
267 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
268    |
269 LL ~             _ if false => {}
270 LL +             Foo(_) | Bar => todo!()
271    |
272
273 error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
274   --> $DIR/empty-match.rs:94:24
275    |
276 LL | / enum NonEmptyEnum5 {
277 LL | |     V1, V2, V3, V4, V5,
278 LL | | }
279    | |_- `NonEmptyEnum5` defined here
280 ...
281 LL |       match_guarded_arm!(NonEmptyEnum5::V1);
282    |                          ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
283    |
284    = note: the matched value is of type `NonEmptyEnum5`
285 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
286    |
287 LL ~             _ if false => {}
288 LL +             _ => todo!()
289    |
290
291 error: aborting due to 22 previous errors
292
293 For more information about this error, try `rustc --explain E0004`.