fork/rust

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

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

master
2.7 KiB83 linesraw
1error[E0004]: non-exhaustive patterns: type `UninhabitedEnum` is non-empty
2  --> $DIR/match.rs:19:11
3   |
4LL |     match x {}
5   |           ^
6   |
7note: `UninhabitedEnum` defined here
8  --> $DIR/auxiliary/uninhabited.rs:5:1
9   |
10LL | pub enum UninhabitedEnum {
11   | ^^^^^^^^^^^^^^^^^^^^^^^^
12   = note: the matched value is of type `UninhabitedEnum`, which is marked as non-exhaustive
13help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
14   |
15LL ~     match x {
16LL +         _ => todo!(),
17LL ~     }
18   |
19
20error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty
21  --> $DIR/match.rs:23:11
22   |
23LL |     match x {}
24   |           ^
25   |
26note: `UninhabitedStruct` defined here
27  --> $DIR/auxiliary/uninhabited.rs:9:1
28   |
29LL | pub struct UninhabitedStruct {
30   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31   = note: the matched value is of type `UninhabitedStruct`
32help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
33   |
34LL ~     match x {
35LL +         _ => todo!(),
36LL ~     }
37   |
38
39error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
40  --> $DIR/match.rs:27:11
41   |
42LL |     match x {}
43   |           ^
44   |
45note: `UninhabitedTupleStruct` defined here
46  --> $DIR/auxiliary/uninhabited.rs:14:1
47   |
48LL | pub struct UninhabitedTupleStruct(!);
49   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50   = note: the matched value is of type `UninhabitedTupleStruct`
51help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
52   |
53LL ~     match x {
54LL +         _ => todo!(),
55LL ~     }
56   |
57
58error[E0004]: non-exhaustive patterns: `UninhabitedVariants::Tuple(_)` and `UninhabitedVariants::Struct { .. }` not covered
59  --> $DIR/match.rs:31:11
60   |
61LL |     match x {}
62   |           ^ patterns `UninhabitedVariants::Tuple(_)` and `UninhabitedVariants::Struct { .. }` not covered
63   |
64note: `UninhabitedVariants` defined here
65  --> $DIR/auxiliary/uninhabited.rs:17:23
66   |
67LL | pub enum UninhabitedVariants {
68   | ----------------------------
69LL |     #[non_exhaustive] Tuple(!),
70   |                       ^^^^^ not covered
71LL |     #[non_exhaustive] Struct { x: ! }
72   |                       ^^^^^^ not covered
73   = note: the matched value is of type `UninhabitedVariants`
74help: 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
75   |
76LL ~     match x {
77LL +         UninhabitedVariants::Tuple(_) | UninhabitedVariants::Struct { .. } => todo!(),
78LL ~     }
79   |
80
81error: aborting due to 4 previous errors
82
83For more information about this error, try `rustc --explain E0004`.