1
1
error: unreachable pattern
2
- --> $DIR/match-empty-exhaustive_patterns.rs:21 :9
2
+ --> $DIR/match-empty-exhaustive_patterns.rs:28 :9
3
3
|
4
4
LL | _ => {},
5
5
| ^
@@ -11,27 +11,27 @@ LL | #![deny(unreachable_patterns)]
11
11
| ^^^^^^^^^^^^^^^^^^^^
12
12
13
13
error: unreachable pattern
14
- --> $DIR/match-empty-exhaustive_patterns.rs:28 :9
14
+ --> $DIR/match-empty-exhaustive_patterns.rs:35 :9
15
15
|
16
16
LL | Some(_) => {}
17
17
| ^^^^^^^
18
18
19
19
error: unreachable pattern
20
- --> $DIR/match-empty-exhaustive_patterns.rs:32 :9
20
+ --> $DIR/match-empty-exhaustive_patterns.rs:39 :9
21
21
|
22
22
LL | Some(_) => {}
23
23
| ^^^^^^^
24
24
25
25
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
26
- --> $DIR/match-empty-exhaustive_patterns.rs:35 :11
26
+ --> $DIR/match-empty-exhaustive_patterns.rs:42 :11
27
27
|
28
28
LL | match 0u8 {}
29
29
| ^^^
30
30
|
31
31
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
32
32
33
33
error[E0004]: non-exhaustive patterns: pattern `NonEmptyStruct` of type `NonEmptyStruct` is not handled
34
- --> $DIR/match-empty-exhaustive_patterns.rs:37 :11
34
+ --> $DIR/match-empty-exhaustive_patterns.rs:44 :11
35
35
|
36
36
LL | struct NonEmptyStruct(bool);
37
37
| ----------------------------
@@ -44,8 +44,41 @@ LL | match NonEmptyStruct(true) {}
44
44
|
45
45
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
46
46
47
+ error[E0004]: non-exhaustive patterns: pattern `NonEmptyUnion1` of type `NonEmptyUnion1` is not handled
48
+ --> $DIR/match-empty-exhaustive_patterns.rs:46:11
49
+ |
50
+ LL | union NonEmptyUnion1 {
51
+ | - -------------- variant not covered
52
+ | _|
53
+ | |
54
+ LL | | foo: (),
55
+ LL | | }
56
+ | |_- `NonEmptyUnion1` defined here
57
+ ...
58
+ LL | match (NonEmptyUnion1 { foo: () }) {}
59
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
+ |
61
+ = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
62
+
63
+ error[E0004]: non-exhaustive patterns: pattern `NonEmptyUnion2` of type `NonEmptyUnion2` is not handled
64
+ --> $DIR/match-empty-exhaustive_patterns.rs:48:11
65
+ |
66
+ LL | union NonEmptyUnion2 {
67
+ | - -------------- variant not covered
68
+ | _|
69
+ | |
70
+ LL | | foo: (),
71
+ LL | | bar: (),
72
+ LL | | }
73
+ | |_- `NonEmptyUnion2` defined here
74
+ ...
75
+ LL | match (NonEmptyUnion2 { foo: () }) {}
76
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
+ |
78
+ = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
79
+
47
80
error[E0004]: non-exhaustive patterns: pattern `Foo` of type `NonEmptyEnum1` is not handled
48
- --> $DIR/match-empty-exhaustive_patterns.rs:39 :11
81
+ --> $DIR/match-empty-exhaustive_patterns.rs:50 :11
49
82
|
50
83
LL | / enum NonEmptyEnum1 {
51
84
LL | | Foo(bool),
@@ -59,7 +92,7 @@ LL | match NonEmptyEnum1::Foo(true) {}
59
92
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
60
93
61
94
error[E0004]: non-exhaustive patterns: multiple patterns of type `NonEmptyEnum2` are not handled
62
- --> $DIR/match-empty-exhaustive_patterns.rs:41 :11
95
+ --> $DIR/match-empty-exhaustive_patterns.rs:52 :11
63
96
|
64
97
LL | / enum NonEmptyEnum2 {
65
98
LL | | Foo(bool),
@@ -75,7 +108,7 @@ LL | match NonEmptyEnum2::Foo(true) {}
75
108
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
76
109
77
110
error[E0004]: non-exhaustive patterns: multiple patterns of type `NonEmptyEnum5` are not handled
78
- --> $DIR/match-empty-exhaustive_patterns.rs:43 :11
111
+ --> $DIR/match-empty-exhaustive_patterns.rs:54 :11
79
112
|
80
113
LL | / enum NonEmptyEnum5 {
81
114
LL | | V1, V2, V3, V4, V5,
@@ -87,6 +120,6 @@ LL | match NonEmptyEnum5::V1 {}
87
120
|
88
121
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
89
122
90
- error: aborting due to 8 previous errors
123
+ error: aborting due to 10 previous errors
91
124
92
125
For more information about this error, try `rustc --explain E0004`.
0 commit comments