fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
11.6 KiB328 linesraw
1error: unreachable pattern
2  --> $DIR/empty-match.rs:58:9
3   |
4LL |         _ => {},
5   |         ^
6   |
7note: the lint level is defined here
8  --> $DIR/empty-match.rs:8:9
9   |
10LL | #![deny(unreachable_patterns)]
11   |         ^^^^^^^^^^^^^^^^^^^^
12
13error: unreachable pattern
14  --> $DIR/empty-match.rs:61:9
15   |
16LL |         _ if false => {},
17   |         ^
18
19error: unreachable pattern
20  --> $DIR/empty-match.rs:68:9
21   |
22LL |         _ => {},
23   |         ^
24
25error: unreachable pattern
26  --> $DIR/empty-match.rs:71:9
27   |
28LL |         _ if false => {},
29   |         ^
30
31error[E0005]: refutable pattern in local binding
32  --> $DIR/empty-match.rs:76:9
33   |
34LL |     let None = x;
35   |         ^^^^ pattern `Some(_)` not covered
36   |
37   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
38   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
39   = note: the matched value is of type `Option<SecretlyUninhabitedForeignStruct>`
40help: you might want to use `if let` to ignore the variant that isn't matched
41   |
42LL |     if let None = x { todo!() };
43   |     ++              +++++++++++
44
45error: unreachable pattern
46  --> $DIR/empty-match.rs:88:9
47   |
48LL |         _ => {},
49   |         ^
50
51error: unreachable pattern
52  --> $DIR/empty-match.rs:91:9
53   |
54LL |         _ if false => {},
55   |         ^
56
57error[E0004]: non-exhaustive patterns: type `u8` is non-empty
58  --> $DIR/empty-match.rs:109:20
59   |
60LL |     match_no_arms!(0u8);
61   |                    ^^^
62   |
63   = note: the matched value is of type `u8`
64   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
65
66error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
67  --> $DIR/empty-match.rs:111:20
68   |
69LL |     match_no_arms!(NonEmptyStruct1);
70   |                    ^^^^^^^^^^^^^^^
71   |
72note: `NonEmptyStruct1` defined here
73  --> $DIR/empty-match.rs:15:8
74   |
75LL | struct NonEmptyStruct1;
76   |        ^^^^^^^^^^^^^^^
77   = note: the matched value is of type `NonEmptyStruct1`
78   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
79
80error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
81  --> $DIR/empty-match.rs:113:20
82   |
83LL |     match_no_arms!(NonEmptyStruct2(true));
84   |                    ^^^^^^^^^^^^^^^^^^^^^
85   |
86note: `NonEmptyStruct2` defined here
87  --> $DIR/empty-match.rs:18:8
88   |
89LL | struct NonEmptyStruct2(bool);
90   |        ^^^^^^^^^^^^^^^
91   = note: the matched value is of type `NonEmptyStruct2`
92   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
93
94error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
95  --> $DIR/empty-match.rs:115:20
96   |
97LL |     match_no_arms!((NonEmptyUnion1 { foo: () }));
98   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99   |
100note: `NonEmptyUnion1` defined here
101  --> $DIR/empty-match.rs:21:7
102   |
103LL | union NonEmptyUnion1 {
104   |       ^^^^^^^^^^^^^^
105   = note: the matched value is of type `NonEmptyUnion1`
106   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
107
108error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
109  --> $DIR/empty-match.rs:117:20
110   |
111LL |     match_no_arms!((NonEmptyUnion2 { foo: () }));
112   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113   |
114note: `NonEmptyUnion2` defined here
115  --> $DIR/empty-match.rs:26:7
116   |
117LL | union NonEmptyUnion2 {
118   |       ^^^^^^^^^^^^^^
119   = note: the matched value is of type `NonEmptyUnion2`
120   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
121
122error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
123  --> $DIR/empty-match.rs:119:20
124   |
125LL |     match_no_arms!(NonEmptyEnum1::Foo(true));
126   |                    ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
127   |
128note: `NonEmptyEnum1` defined here
129  --> $DIR/empty-match.rs:33:5
130   |
131LL | enum NonEmptyEnum1 {
132   |      -------------
133LL |     Foo(bool),
134   |     ^^^ not covered
135   = note: the matched value is of type `NonEmptyEnum1`
136   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
137
138error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
139  --> $DIR/empty-match.rs:122:20
140   |
141LL |     match_no_arms!(NonEmptyEnum2::Foo(true));
142   |                    ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
143   |
144note: `NonEmptyEnum2` defined here
145  --> $DIR/empty-match.rs:40:5
146   |
147LL | enum NonEmptyEnum2 {
148   |      -------------
149LL |     Foo(bool),
150   |     ^^^ not covered
151...
152LL |     Bar,
153   |     ^^^ not covered
154   = note: the matched value is of type `NonEmptyEnum2`
155   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
156
157error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
158  --> $DIR/empty-match.rs:125:20
159   |
160LL |     match_no_arms!(NonEmptyEnum5::V1);
161   |                    ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
162   |
163note: `NonEmptyEnum5` defined here
164  --> $DIR/empty-match.rs:49:6
165   |
166LL | enum NonEmptyEnum5 {
167   |      ^^^^^^^^^^^^^
168   = note: the matched value is of type `NonEmptyEnum5`
169   = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
170
171error[E0004]: non-exhaustive patterns: `_` not covered
172  --> $DIR/empty-match.rs:129:24
173   |
174LL |     match_guarded_arm!(0u8);
175   |                        ^^^ pattern `_` not covered
176   |
177   = note: the matched value is of type `u8`
178   = note: match arms with guards don't count towards exhaustivity
179help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
180   |
181LL ~             _ if false => {},
182LL +             _ => todo!()
183   |
184
185error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
186  --> $DIR/empty-match.rs:134:24
187   |
188LL |     match_guarded_arm!(NonEmptyStruct1);
189   |                        ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
190   |
191note: `NonEmptyStruct1` defined here
192  --> $DIR/empty-match.rs:15:8
193   |
194LL | struct NonEmptyStruct1;
195   |        ^^^^^^^^^^^^^^^
196   = note: the matched value is of type `NonEmptyStruct1`
197   = note: match arms with guards don't count towards exhaustivity
198help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
199   |
200LL ~             _ if false => {},
201LL +             NonEmptyStruct1 => todo!()
202   |
203
204error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
205  --> $DIR/empty-match.rs:139:24
206   |
207LL |     match_guarded_arm!(NonEmptyStruct2(true));
208   |                        ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
209   |
210note: `NonEmptyStruct2` defined here
211  --> $DIR/empty-match.rs:18:8
212   |
213LL | struct NonEmptyStruct2(bool);
214   |        ^^^^^^^^^^^^^^^
215   = note: the matched value is of type `NonEmptyStruct2`
216   = note: match arms with guards don't count towards exhaustivity
217help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
218   |
219LL ~             _ if false => {},
220LL +             NonEmptyStruct2(_) => todo!()
221   |
222
223error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
224  --> $DIR/empty-match.rs:144:24
225   |
226LL |     match_guarded_arm!((NonEmptyUnion1 { foo: () }));
227   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
228   |
229note: `NonEmptyUnion1` defined here
230  --> $DIR/empty-match.rs:21:7
231   |
232LL | union NonEmptyUnion1 {
233   |       ^^^^^^^^^^^^^^
234   = note: the matched value is of type `NonEmptyUnion1`
235   = note: match arms with guards don't count towards exhaustivity
236help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
237   |
238LL ~             _ if false => {},
239LL +             NonEmptyUnion1 { .. } => todo!()
240   |
241
242error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
243  --> $DIR/empty-match.rs:149:24
244   |
245LL |     match_guarded_arm!((NonEmptyUnion2 { foo: () }));
246   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
247   |
248note: `NonEmptyUnion2` defined here
249  --> $DIR/empty-match.rs:26:7
250   |
251LL | union NonEmptyUnion2 {
252   |       ^^^^^^^^^^^^^^
253   = note: the matched value is of type `NonEmptyUnion2`
254   = note: match arms with guards don't count towards exhaustivity
255help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
256   |
257LL ~             _ if false => {},
258LL +             NonEmptyUnion2 { .. } => todo!()
259   |
260
261error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
262  --> $DIR/empty-match.rs:154:24
263   |
264LL |     match_guarded_arm!(NonEmptyEnum1::Foo(true));
265   |                        ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
266   |
267note: `NonEmptyEnum1` defined here
268  --> $DIR/empty-match.rs:33:5
269   |
270LL | enum NonEmptyEnum1 {
271   |      -------------
272LL |     Foo(bool),
273   |     ^^^ not covered
274   = note: the matched value is of type `NonEmptyEnum1`
275   = note: match arms with guards don't count towards exhaustivity
276help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
277   |
278LL ~             _ if false => {},
279LL +             NonEmptyEnum1::Foo(_) => todo!()
280   |
281
282error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
283  --> $DIR/empty-match.rs:159:24
284   |
285LL |     match_guarded_arm!(NonEmptyEnum2::Foo(true));
286   |                        ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
287   |
288note: `NonEmptyEnum2` defined here
289  --> $DIR/empty-match.rs:40:5
290   |
291LL | enum NonEmptyEnum2 {
292   |      -------------
293LL |     Foo(bool),
294   |     ^^^ not covered
295...
296LL |     Bar,
297   |     ^^^ not covered
298   = note: the matched value is of type `NonEmptyEnum2`
299   = note: match arms with guards don't count towards exhaustivity
300help: 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
301   |
302LL ~             _ if false => {},
303LL +             NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
304   |
305
306error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
307  --> $DIR/empty-match.rs:164:24
308   |
309LL |     match_guarded_arm!(NonEmptyEnum5::V1);
310   |                        ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
311   |
312note: `NonEmptyEnum5` defined here
313  --> $DIR/empty-match.rs:49:6
314   |
315LL | enum NonEmptyEnum5 {
316   |      ^^^^^^^^^^^^^
317   = note: the matched value is of type `NonEmptyEnum5`
318   = note: match arms with guards don't count towards exhaustivity
319help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
320   |
321LL ~             _ if false => {},
322LL +             _ => todo!()
323   |
324
325error: aborting due to 23 previous errors
326
327Some errors have detailed explanations: E0004, E0005.
328For more information about an error, try `rustc --explain E0004`.