fork/rust

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

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

master
1.9 KiB60 linesraw
1error[E0004]: non-exhaustive patterns: type `EmptyNonExhaustiveEnum` is non-empty
2  --> $DIR/enum.rs:7:11
3   |
4LL |     match x {}
5   |           ^
6   |
7note: `EmptyNonExhaustiveEnum` defined here
8  --> $DIR/auxiliary/enums.rs:18:1
9   |
10LL | pub enum EmptyNonExhaustiveEnum {}
11   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12   = note: the matched value is of type `EmptyNonExhaustiveEnum`, 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: `_` not covered
21  --> $DIR/enum.rs:16:11
22   |
23LL |     match enum_unit {
24   |           ^^^^^^^^^ pattern `_` not covered
25   |
26note: `NonExhaustiveEnum` defined here
27  --> $DIR/auxiliary/enums.rs:4:1
28   |
29LL | pub enum NonExhaustiveEnum {
30   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
31   = note: the matched value is of type `NonExhaustiveEnum`
32   = note: `NonExhaustiveEnum` is marked as non-exhaustive, so a wildcard `_` is necessary to match exhaustively
33help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
34   |
35LL ~         NonExhaustiveEnum::Struct { .. } => "third",
36LL +         _ => todo!()
37   |
38
39error[E0004]: non-exhaustive patterns: `_` not covered
40  --> $DIR/enum.rs:23:11
41   |
42LL |     match enum_unit {};
43   |           ^^^^^^^^^ pattern `_` not covered
44   |
45note: `NonExhaustiveEnum` defined here
46  --> $DIR/auxiliary/enums.rs:4:1
47   |
48LL | pub enum NonExhaustiveEnum {
49   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
50   = note: the matched value is of type `NonExhaustiveEnum`
51help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
52   |
53LL ~     match enum_unit {
54LL +         _ => todo!(),
55LL ~     };
56   |
57
58error: aborting due to 3 previous errors
59
60For more information about this error, try `rustc --explain E0004`.