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