]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / rfc-2008-non-exhaustive / uninhabited / indirect_match_same_crate.stderr
1 error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedEnum` is non-empty
2   --> $DIR/indirect_match_same_crate.rs:34:11
3    |
4 LL |     match x {}
5    |           ^
6    |
7 note: `IndirectUninhabitedEnum` defined here
8   --> $DIR/indirect_match_same_crate.rs:20:12
9    |
10 LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum);
11    |            ^^^^^^^^^^^^^^^^^^^^^^^
12    = note: the matched value is of type `IndirectUninhabitedEnum`
13 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
14    |
15 LL ~     match x {
16 LL +         _ => todo!(),
17 LL ~     }
18    |
19
20 error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty
21   --> $DIR/indirect_match_same_crate.rs:38:11
22    |
23 LL |     match x {}
24    |           ^
25    |
26 note: `IndirectUninhabitedStruct` defined here
27   --> $DIR/indirect_match_same_crate.rs:22:12
28    |
29 LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct);
30    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
31    = note: the matched value is of type `IndirectUninhabitedStruct`
32 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
33    |
34 LL ~     match x {
35 LL +         _ => todo!(),
36 LL ~     }
37    |
38
39 error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty
40   --> $DIR/indirect_match_same_crate.rs:42:11
41    |
42 LL |     match x {}
43    |           ^
44    |
45 note: `IndirectUninhabitedTupleStruct` defined here
46   --> $DIR/indirect_match_same_crate.rs:24:12
47    |
48 LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct);
49    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50    = note: the matched value is of type `IndirectUninhabitedTupleStruct`
51 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
52    |
53 LL ~     match x {
54 LL +         _ => todo!(),
55 LL ~     }
56    |
57
58 error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty
59   --> $DIR/indirect_match_same_crate.rs:48:11
60    |
61 LL |     match x {}
62    |           ^
63    |
64 note: `IndirectUninhabitedVariants` defined here
65   --> $DIR/indirect_match_same_crate.rs:26:12
66    |
67 LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants);
68    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
69    = note: the matched value is of type `IndirectUninhabitedVariants`
70 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
71    |
72 LL ~     match x {
73 LL +         _ => todo!(),
74 LL ~     }
75    |
76
77 error: aborting due to 4 previous errors
78
79 For more information about this error, try `rustc --explain E0004`.