]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr
Auto merge of #78682 - glandium:issue78471, r=lcnr
[rust.git] / src / test / ui / pattern / usefulness / match-empty-exhaustive_patterns.stderr
1 error: unreachable pattern
2   --> $DIR/match-empty-exhaustive_patterns.rs:52:9
3    |
4 LL |         _ => {},
5    |         ^
6    |
7 note: the lint level is defined here
8   --> $DIR/match-empty-exhaustive_patterns.rs:5:9
9    |
10 LL | #![deny(unreachable_patterns)]
11    |         ^^^^^^^^^^^^^^^^^^^^
12
13 error: unreachable pattern
14   --> $DIR/match-empty-exhaustive_patterns.rs:55:9
15    |
16 LL |         _ if false => {},
17    |         ^
18
19 error: unreachable pattern
20   --> $DIR/match-empty-exhaustive_patterns.rs:62:9
21    |
22 LL |         _ => {},
23    |         ^
24
25 error: unreachable pattern
26   --> $DIR/match-empty-exhaustive_patterns.rs:65:9
27    |
28 LL |         _ if false => {},
29    |         ^
30
31 error: unreachable pattern
32   --> $DIR/match-empty-exhaustive_patterns.rs:72:9
33    |
34 LL |         _ => {},
35    |         ^
36
37 error: unreachable pattern
38   --> $DIR/match-empty-exhaustive_patterns.rs:75:9
39    |
40 LL |         _ if false => {},
41    |         ^
42
43 error: unreachable pattern
44   --> $DIR/match-empty-exhaustive_patterns.rs:82:9
45    |
46 LL |         Some(_) => {}
47    |         ^^^^^^^
48
49 error: unreachable pattern
50   --> $DIR/match-empty-exhaustive_patterns.rs:86:9
51    |
52 LL |         Some(_) => {}
53    |         ^^^^^^^
54
55 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
56   --> $DIR/match-empty-exhaustive_patterns.rs:89:18
57    |
58 LL |     match_empty!(0u8);
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 `u8`
63
64 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
65   --> $DIR/match-empty-exhaustive_patterns.rs:91:18
66    |
67 LL | struct NonEmptyStruct(bool);
68    | ---------------------------- `NonEmptyStruct` defined here
69 ...
70 LL |     match_empty!(NonEmptyStruct(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 `NonEmptyStruct`
75
76 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
77   --> $DIR/match-empty-exhaustive_patterns.rs:93:18
78    |
79 LL | / union NonEmptyUnion1 {
80 LL | |     foo: (),
81 LL | | }
82    | |_- `NonEmptyUnion1` defined here
83 ...
84 LL |       match_empty!((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/match-empty-exhaustive_patterns.rs:95:18
92    |
93 LL | / union NonEmptyUnion2 {
94 LL | |     foo: (),
95 LL | |     bar: (),
96 LL | | }
97    | |_- `NonEmptyUnion2` defined here
98 ...
99 LL |       match_empty!((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/match-empty-exhaustive_patterns.rs:97:18
107    |
108 LL | / enum NonEmptyEnum1 {
109 LL | |     Foo(bool),
110    | |     --- not covered
111 LL | |
112 LL | |
113 LL | | }
114    | |_- `NonEmptyEnum1` defined here
115 ...
116 LL |       match_empty!(NonEmptyEnum1::Foo(true));
117    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
118    |
119    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
120    = note: the matched value is of type `NonEmptyEnum1`
121
122 error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
123   --> $DIR/match-empty-exhaustive_patterns.rs:99:18
124    |
125 LL | / enum NonEmptyEnum2 {
126 LL | |     Foo(bool),
127    | |     --- not covered
128 LL | |
129 LL | |
130 LL | |     Bar,
131    | |     --- not covered
132 LL | |
133 LL | |
134 LL | | }
135    | |_- `NonEmptyEnum2` defined here
136 ...
137 LL |       match_empty!(NonEmptyEnum2::Foo(true));
138    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
139    |
140    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
141    = note: the matched value is of type `NonEmptyEnum2`
142
143 error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
144   --> $DIR/match-empty-exhaustive_patterns.rs:101:18
145    |
146 LL | / enum NonEmptyEnum5 {
147 LL | |     V1, V2, V3, V4, V5,
148 LL | | }
149    | |_- `NonEmptyEnum5` defined here
150 ...
151 LL |       match_empty!(NonEmptyEnum5::V1);
152    |                    ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
153    |
154    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
155    = note: the matched value is of type `NonEmptyEnum5`
156
157 error[E0004]: non-exhaustive patterns: `_` not covered
158   --> $DIR/match-empty-exhaustive_patterns.rs:104:18
159    |
160 LL |     match_false!(0u8);
161    |                  ^^^ pattern `_` not covered
162    |
163    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
164    = note: the matched value is of type `u8`
165
166 error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
167   --> $DIR/match-empty-exhaustive_patterns.rs:106:18
168    |
169 LL | struct NonEmptyStruct(bool);
170    | ---------------------------- `NonEmptyStruct` defined here
171 ...
172 LL |     match_false!(NonEmptyStruct(true));
173    |                  ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered
174    |
175    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
176    = note: the matched value is of type `NonEmptyStruct`
177
178 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
179   --> $DIR/match-empty-exhaustive_patterns.rs:108:18
180    |
181 LL | / union NonEmptyUnion1 {
182 LL | |     foo: (),
183 LL | | }
184    | |_- `NonEmptyUnion1` defined here
185 ...
186 LL |       match_false!((NonEmptyUnion1 { foo: () }));
187    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
188    |
189    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
190    = note: the matched value is of type `NonEmptyUnion1`
191
192 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
193   --> $DIR/match-empty-exhaustive_patterns.rs:110:18
194    |
195 LL | / union NonEmptyUnion2 {
196 LL | |     foo: (),
197 LL | |     bar: (),
198 LL | | }
199    | |_- `NonEmptyUnion2` defined here
200 ...
201 LL |       match_false!((NonEmptyUnion2 { foo: () }));
202    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
203    |
204    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
205    = note: the matched value is of type `NonEmptyUnion2`
206
207 error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
208   --> $DIR/match-empty-exhaustive_patterns.rs:112:18
209    |
210 LL | / enum NonEmptyEnum1 {
211 LL | |     Foo(bool),
212    | |     --- not covered
213 LL | |
214 LL | |
215 LL | | }
216    | |_- `NonEmptyEnum1` defined here
217 ...
218 LL |       match_false!(NonEmptyEnum1::Foo(true));
219    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
220    |
221    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
222    = note: the matched value is of type `NonEmptyEnum1`
223
224 error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
225   --> $DIR/match-empty-exhaustive_patterns.rs:114:18
226    |
227 LL | / enum NonEmptyEnum2 {
228 LL | |     Foo(bool),
229    | |     --- not covered
230 LL | |
231 LL | |
232 LL | |     Bar,
233    | |     --- not covered
234 LL | |
235 LL | |
236 LL | | }
237    | |_- `NonEmptyEnum2` defined here
238 ...
239 LL |       match_false!(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/match-empty-exhaustive_patterns.rs:116:18
247    |
248 LL | / enum NonEmptyEnum5 {
249 LL | |     V1, V2, V3, V4, V5,
250 LL | | }
251    | |_- `NonEmptyEnum5` defined here
252 ...
253 LL |       match_false!(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`.