]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
50    = note: the matched value is of type `u8`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
62    = note: the matched value is of type `NonEmptyStruct1`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
74    = note: the matched value is of type `NonEmptyStruct2`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88    = note: the matched value is of type `NonEmptyUnion1`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
103    = note: the matched value is of type `NonEmptyUnion2`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
118    = note: the matched value is of type `NonEmptyEnum1`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
135    = note: the matched value is of type `NonEmptyEnum2`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
149    = note: the matched value is of type `NonEmptyEnum5`
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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
158    = note: the matched value is of type `u8`
159
160 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
161   --> $DIR/empty-match.rs:88:24
162    |
163 LL | struct NonEmptyStruct1;
164    | ----------------------- `NonEmptyStruct1` defined here
165 ...
166 LL |     match_guarded_arm!(NonEmptyStruct1);
167    |                        ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
168    |
169    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
170    = note: the matched value is of type `NonEmptyStruct1`
171
172 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
173   --> $DIR/empty-match.rs:89:24
174    |
175 LL | struct NonEmptyStruct2(bool);
176    | ----------------------------- `NonEmptyStruct2` defined here
177 ...
178 LL |     match_guarded_arm!(NonEmptyStruct2(true));
179    |                        ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
180    |
181    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
182    = note: the matched value is of type `NonEmptyStruct2`
183
184 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
185   --> $DIR/empty-match.rs:90:24
186    |
187 LL | / union NonEmptyUnion1 {
188 LL | |     foo: (),
189 LL | | }
190    | |_- `NonEmptyUnion1` defined here
191 ...
192 LL |       match_guarded_arm!((NonEmptyUnion1 { foo: () }));
193    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
194    |
195    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
196    = note: the matched value is of type `NonEmptyUnion1`
197
198 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
199   --> $DIR/empty-match.rs:91:24
200    |
201 LL | / union NonEmptyUnion2 {
202 LL | |     foo: (),
203 LL | |     bar: (),
204 LL | | }
205    | |_- `NonEmptyUnion2` defined here
206 ...
207 LL |       match_guarded_arm!((NonEmptyUnion2 { foo: () }));
208    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
209    |
210    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
211    = note: the matched value is of type `NonEmptyUnion2`
212
213 error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
214   --> $DIR/empty-match.rs:92:24
215    |
216 LL | / enum NonEmptyEnum1 {
217 LL | |     Foo(bool),
218    | |     --- not covered
219 LL | | }
220    | |_- `NonEmptyEnum1` defined here
221 ...
222 LL |       match_guarded_arm!(NonEmptyEnum1::Foo(true));
223    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
224    |
225    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
226    = note: the matched value is of type `NonEmptyEnum1`
227
228 error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
229   --> $DIR/empty-match.rs:93:24
230    |
231 LL | / enum NonEmptyEnum2 {
232 LL | |     Foo(bool),
233    | |     --- not covered
234 LL | |     Bar,
235    | |     --- not covered
236 LL | | }
237    | |_- `NonEmptyEnum2` defined here
238 ...
239 LL |       match_guarded_arm!(NonEmptyEnum2::Foo(true));
240    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
241    |
242    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
243    = note: the matched value is of type `NonEmptyEnum2`
244
245 error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
246   --> $DIR/empty-match.rs:94:24
247    |
248 LL | / enum NonEmptyEnum5 {
249 LL | |     V1, V2, V3, V4, V5,
250 LL | | }
251    | |_- `NonEmptyEnum5` defined here
252 ...
253 LL |       match_guarded_arm!(NonEmptyEnum5::V1);
254    |                          ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
255    |
256    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
257    = note: the matched value is of type `NonEmptyEnum5`
258
259 error: aborting due to 22 previous errors
260
261 For more information about this error, try `rustc --explain E0004`.