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