]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / rfc-2008-non-exhaustive / uninhabited / match_same_crate.stderr
CommitLineData
60c5eb7d 1error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty
e74abb32 2 --> $DIR/match_same_crate.rs:30:11
48663c56 3 |
60c5eb7d 4LL | / pub struct UninhabitedStruct {
48663c56
XL
5LL | | _priv: !,
6LL | | }
7 | |_- `UninhabitedStruct` defined here
8...
9LL | match x {}
10 | ^
11 |
12 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
ba9703b0 13 = note: the matched value is of type `UninhabitedStruct`
48663c56 14
60c5eb7d 15error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
e74abb32 16 --> $DIR/match_same_crate.rs:34:11
48663c56
XL
17 |
18LL | pub struct UninhabitedTupleStruct(!);
60c5eb7d 19 | ------------------------------------- `UninhabitedTupleStruct` defined here
48663c56
XL
20...
21LL | match x {}
22 | ^
23 |
24 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
ba9703b0 25 = note: the matched value is of type `UninhabitedTupleStruct`
48663c56 26
60c5eb7d 27error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
e74abb32 28 --> $DIR/match_same_crate.rs:38:11
48663c56
XL
29 |
30LL | / pub enum UninhabitedVariants {
31LL | | #[non_exhaustive] Tuple(!),
60c5eb7d 32 | | ----- not covered
48663c56 33LL | | #[non_exhaustive] Struct { x: ! }
60c5eb7d 34 | | ------ not covered
48663c56
XL
35LL | | }
36 | |_- `UninhabitedVariants` defined here
37...
38LL | match x {}
60c5eb7d 39 | ^ patterns `Tuple(_)` and `Struct { .. }` not covered
48663c56
XL
40 |
41 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
ba9703b0 42 = note: the matched value is of type `UninhabitedVariants`
48663c56
XL
43
44error: aborting due to 3 previous errors
45
46For more information about this error, try `rustc --explain E0004`.