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