fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.7 KiB46 linesraw
1error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty
2  --> $DIR/match_same_crate.rs:30:11
3   |
4LL | / pub struct UninhabitedStruct {
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
13   = note: the matched value is of type `UninhabitedStruct`
14
15error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
16  --> $DIR/match_same_crate.rs:34:11
17   |
18LL | pub struct UninhabitedTupleStruct(!);
19   | ------------------------------------- `UninhabitedTupleStruct` defined here
20...
21LL |     match x {}
22   |           ^
23   |
24   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
25   = note: the matched value is of type `UninhabitedTupleStruct`
26
27error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
28  --> $DIR/match_same_crate.rs:38:11
29   |
30LL | / pub enum UninhabitedVariants {
31LL | |     #[non_exhaustive] Tuple(!),
32   | |                       ----- not covered
33LL | |     #[non_exhaustive] Struct { x: ! }
34   | |                       ------ not covered
35LL | | }
36   | |_- `UninhabitedVariants` defined here
37...
38LL |       match x {}
39   |             ^ patterns `Tuple(_)` and `Struct { .. }` not covered
40   |
41   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
42   = note: the matched value is of type `UninhabitedVariants`
43
44error: aborting due to 3 previous errors
45
46For more information about this error, try `rustc --explain E0004`.