]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/usefulness/empty-match.normal.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / empty-match.normal.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 by adding a match arm with a wildcard pattern
51
52 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
53 --> $DIR/empty-match.rs:79:20
54 |
55 LL | match_no_arms!(NonEmptyStruct1);
56 | ^^^^^^^^^^^^^^^
57 |
58 note: `NonEmptyStruct1` defined here
59 --> $DIR/empty-match.rs:14:8
60 |
61 LL | struct NonEmptyStruct1;
62 | ^^^^^^^^^^^^^^^
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
65
66 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
67 --> $DIR/empty-match.rs:80:20
68 |
69 LL | match_no_arms!(NonEmptyStruct2(true));
70 | ^^^^^^^^^^^^^^^^^^^^^
71 |
72 note: `NonEmptyStruct2` defined here
73 --> $DIR/empty-match.rs:15:8
74 |
75 LL | struct NonEmptyStruct2(bool);
76 | ^^^^^^^^^^^^^^^
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
79
80 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
81 --> $DIR/empty-match.rs:81:20
82 |
83 LL | match_no_arms!((NonEmptyUnion1 { foo: () }));
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85 |
86 note: `NonEmptyUnion1` defined here
87 --> $DIR/empty-match.rs:16:7
88 |
89 LL | union NonEmptyUnion1 {
90 | ^^^^^^^^^^^^^^
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
93
94 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
95 --> $DIR/empty-match.rs:82:20
96 |
97 LL | match_no_arms!((NonEmptyUnion2 { foo: () }));
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99 |
100 note: `NonEmptyUnion2` defined here
101 --> $DIR/empty-match.rs:19:7
102 |
103 LL | union NonEmptyUnion2 {
104 | ^^^^^^^^^^^^^^
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
107
108 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
109 --> $DIR/empty-match.rs:83:20
110 |
111 LL | match_no_arms!(NonEmptyEnum1::Foo(true));
112 | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
113 |
114 note: `NonEmptyEnum1` defined here
115 --> $DIR/empty-match.rs:24:5
116 |
117 LL | enum NonEmptyEnum1 {
118 | -------------
119 LL | Foo(bool),
120 | ^^^ not covered
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
123
124 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
125 --> $DIR/empty-match.rs:84:20
126 |
127 LL | match_no_arms!(NonEmptyEnum2::Foo(true));
128 | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
129 |
130 note: `NonEmptyEnum2` defined here
131 --> $DIR/empty-match.rs:27:5
132 |
133 LL | enum NonEmptyEnum2 {
134 | -------------
135 LL | Foo(bool),
136 | ^^^ not covered
137 LL | Bar,
138 | ^^^ not covered
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
141
142 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
143 --> $DIR/empty-match.rs:85:20
144 |
145 LL | match_no_arms!(NonEmptyEnum5::V1);
146 | ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
147 |
148 note: `NonEmptyEnum5` defined here
149 --> $DIR/empty-match.rs:30:6
150 |
151 LL | enum NonEmptyEnum5 {
152 | ^^^^^^^^^^^^^
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
155
156 error[E0004]: non-exhaustive patterns: `_` not covered
157 --> $DIR/empty-match.rs:87:24
158 |
159 LL | match_guarded_arm!(0u8);
160 | ^^^ pattern `_` not covered
161 |
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
164 |
165 LL ~ _ if false => {}
166 LL + _ => todo!()
167 |
168
169 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
170 --> $DIR/empty-match.rs:88:24
171 |
172 LL | match_guarded_arm!(NonEmptyStruct1);
173 | ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
174 |
175 note: `NonEmptyStruct1` defined here
176 --> $DIR/empty-match.rs:14:8
177 |
178 LL | struct NonEmptyStruct1;
179 | ^^^^^^^^^^^^^^^
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
182 |
183 LL ~ _ if false => {}
184 LL + NonEmptyStruct1 => todo!()
185 |
186
187 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
188 --> $DIR/empty-match.rs:89:24
189 |
190 LL | match_guarded_arm!(NonEmptyStruct2(true));
191 | ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
192 |
193 note: `NonEmptyStruct2` defined here
194 --> $DIR/empty-match.rs:15:8
195 |
196 LL | struct NonEmptyStruct2(bool);
197 | ^^^^^^^^^^^^^^^
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
200 |
201 LL ~ _ if false => {}
202 LL + NonEmptyStruct2(_) => todo!()
203 |
204
205 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
206 --> $DIR/empty-match.rs:90:24
207 |
208 LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
210 |
211 note: `NonEmptyUnion1` defined here
212 --> $DIR/empty-match.rs:16:7
213 |
214 LL | union NonEmptyUnion1 {
215 | ^^^^^^^^^^^^^^
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
218 |
219 LL ~ _ if false => {}
220 LL + NonEmptyUnion1 { .. } => todo!()
221 |
222
223 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
224 --> $DIR/empty-match.rs:91:24
225 |
226 LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
227 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
228 |
229 note: `NonEmptyUnion2` defined here
230 --> $DIR/empty-match.rs:19:7
231 |
232 LL | union NonEmptyUnion2 {
233 | ^^^^^^^^^^^^^^
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
236 |
237 LL ~ _ if false => {}
238 LL + NonEmptyUnion2 { .. } => todo!()
239 |
240
241 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
242 --> $DIR/empty-match.rs:92:24
243 |
244 LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
245 | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
246 |
247 note: `NonEmptyEnum1` defined here
248 --> $DIR/empty-match.rs:24:5
249 |
250 LL | enum NonEmptyEnum1 {
251 | -------------
252 LL | Foo(bool),
253 | ^^^ not covered
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
256 |
257 LL ~ _ if false => {}
258 LL + NonEmptyEnum1::Foo(_) => todo!()
259 |
260
261 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
262 --> $DIR/empty-match.rs:93:24
263 |
264 LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
265 | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
266 |
267 note: `NonEmptyEnum2` defined here
268 --> $DIR/empty-match.rs:27:5
269 |
270 LL | enum NonEmptyEnum2 {
271 | -------------
272 LL | Foo(bool),
273 | ^^^ not covered
274 LL | Bar,
275 | ^^^ not covered
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
278 |
279 LL ~ _ if false => {}
280 LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
281 |
282
283 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
284 --> $DIR/empty-match.rs:94:24
285 |
286 LL | match_guarded_arm!(NonEmptyEnum5::V1);
287 | ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
288 |
289 note: `NonEmptyEnum5` defined here
290 --> $DIR/empty-match.rs:30:6
291 |
292 LL | enum NonEmptyEnum5 {
293 | ^^^^^^^^^^^^^
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
296 |
297 LL ~ _ if false => {}
298 LL + _ => todo!()
299 |
300
301 error: aborting due to 22 previous errors
302
303 For more information about this error, try `rustc --explain E0004`.