]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr
New upstream version 1.42.0+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / non-exhaustive-pattern-witness.stderr
1 error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered
2 --> $DIR/non-exhaustive-pattern-witness.rs:7:11
3 |
4 LL | / struct Foo {
5 LL | | first: bool,
6 LL | | second: Option<[usize; 4]>
7 LL | | }
8 | |_- `Foo` defined here
9 ...
10 LL | match (Foo { first: true, second: None }) {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
12 |
13 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
14
15 error[E0004]: non-exhaustive patterns: `Red` not covered
16 --> $DIR/non-exhaustive-pattern-witness.rs:23:11
17 |
18 LL | / enum Color {
19 LL | | Red,
20 | | --- not covered
21 LL | | Green,
22 LL | | CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
23 LL | | }
24 | |_- `Color` defined here
25 ...
26 LL | match Color::Red {
27 | ^^^^^^^^^^ pattern `Red` not covered
28 |
29 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
30
31 error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered
32 --> $DIR/non-exhaustive-pattern-witness.rs:35:11
33 |
34 LL | / enum Direction {
35 LL | | North, East, South, West
36 | | ---- ----- ---- not covered
37 | | | |
38 | | | not covered
39 | | not covered
40 LL | | }
41 | |_- `Direction` defined here
42 ...
43 LL | match Direction::North {
44 | ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered
45 |
46 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
47
48 error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered
49 --> $DIR/non-exhaustive-pattern-witness.rs:46:11
50 |
51 LL | / enum ExcessiveEnum {
52 LL | | First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth
53 LL | | }
54 | |_- `ExcessiveEnum` defined here
55 ...
56 LL | match ExcessiveEnum::First {
57 | ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered
58 |
59 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
60
61 error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered
62 --> $DIR/non-exhaustive-pattern-witness.rs:54:11
63 |
64 LL | / enum Color {
65 LL | | Red,
66 LL | | Green,
67 LL | | CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
68 | | ---------- not covered
69 LL | | }
70 | |_- `Color` defined here
71 ...
72 LL | match Color::Red {
73 | ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered
74 |
75 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
76
77 error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered
78 --> $DIR/non-exhaustive-pattern-witness.rs:70:11
79 |
80 LL | match *x {
81 | ^^ pattern `[Second(true), Second(false)]` not covered
82 |
83 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
84
85 error[E0004]: non-exhaustive patterns: `((), false)` not covered
86 --> $DIR/non-exhaustive-pattern-witness.rs:83:11
87 |
88 LL | match ((), false) {
89 | ^^^^^^^^^^^ pattern `((), false)` not covered
90 |
91 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
92
93 error: aborting due to 7 previous errors
94
95 For more information about this error, try `rustc --explain E0004`.