1
1
error: unreachable pattern
2
- --> $DIR/match-empty-exhaustive_patterns.rs:41 :9
2
+ --> $DIR/match-empty-exhaustive_patterns.rs:47 :9
3
3
|
4
4
LL | _ => {},
5
5
| ^
@@ -11,108 +11,114 @@ LL | #![deny(unreachable_patterns)]
11
11
| ^^^^^^^^^^^^^^^^^^^^
12
12
13
13
error: unreachable pattern
14
- --> $DIR/match-empty-exhaustive_patterns.rs:44 :9
14
+ --> $DIR/match-empty-exhaustive_patterns.rs:50 :9
15
15
|
16
16
LL | _ if false => {},
17
17
| ^
18
18
19
19
error: unreachable pattern
20
- --> $DIR/match-empty-exhaustive_patterns.rs:51 :9
20
+ --> $DIR/match-empty-exhaustive_patterns.rs:57 :9
21
21
|
22
22
LL | Some(_) => {}
23
23
| ^^^^^^^
24
24
25
25
error: unreachable pattern
26
- --> $DIR/match-empty-exhaustive_patterns.rs:55 :9
26
+ --> $DIR/match-empty-exhaustive_patterns.rs:61 :9
27
27
|
28
28
LL | Some(_) => {}
29
29
| ^^^^^^^
30
30
31
31
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
32
- --> $DIR/match-empty-exhaustive_patterns.rs:58 :18
32
+ --> $DIR/match-empty-exhaustive_patterns.rs:64 :18
33
33
|
34
34
LL | match_empty!(0u8);
35
35
| ^^^
36
36
|
37
37
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
38
38
39
39
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
40
- --> $DIR/match-empty-exhaustive_patterns.rs:60 :18
40
+ --> $DIR/match-empty-exhaustive_patterns.rs:66 :18
41
41
|
42
42
LL | match_empty!(NonEmptyStruct(true));
43
43
| ^^^^^^^^^^^^^^^^^^^^
44
44
|
45
45
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
46
46
47
47
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
48
- --> $DIR/match-empty-exhaustive_patterns.rs:62 :18
48
+ --> $DIR/match-empty-exhaustive_patterns.rs:68 :18
49
49
|
50
50
LL | match_empty!((NonEmptyUnion1 { foo: () }));
51
51
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
52
|
53
53
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
54
54
55
55
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
56
- --> $DIR/match-empty-exhaustive_patterns.rs:64 :18
56
+ --> $DIR/match-empty-exhaustive_patterns.rs:70 :18
57
57
|
58
58
LL | match_empty!((NonEmptyUnion2 { foo: () }));
59
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
60
|
61
61
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
62
62
63
- error[E0004]: non-exhaustive patterns: pattern `Foo` of type `NonEmptyEnum1` is not handled
64
- --> $DIR/match-empty-exhaustive_patterns.rs:66 :18
63
+ error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
64
+ --> $DIR/match-empty-exhaustive_patterns.rs:72 :18
65
65
|
66
66
LL | / enum NonEmptyEnum1 {
67
67
LL | | Foo(bool),
68
- | | --- variant not covered
68
+ | | --- not covered
69
+ LL | |
70
+ LL | |
69
71
LL | | }
70
72
| |_- `NonEmptyEnum1` defined here
71
73
...
72
74
LL | match_empty!(NonEmptyEnum1::Foo(true));
73
- | ^^^^^^^^^^^^^^^^^^^^^^^^
75
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
74
76
|
75
77
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
76
78
77
- error[E0004]: non-exhaustive patterns: multiple patterns of type `NonEmptyEnum2` are not handled
78
- --> $DIR/match-empty-exhaustive_patterns.rs:68 :18
79
+ error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
80
+ --> $DIR/match-empty-exhaustive_patterns.rs:74 :18
79
81
|
80
82
LL | / enum NonEmptyEnum2 {
81
83
LL | | Foo(bool),
82
- | | --- variant not covered
84
+ | | --- not covered
85
+ LL | |
86
+ LL | |
83
87
LL | | Bar,
84
- | | --- variant not covered
88
+ | | --- not covered
89
+ LL | |
90
+ LL | |
85
91
LL | | }
86
92
| |_- `NonEmptyEnum2` defined here
87
93
...
88
94
LL | match_empty!(NonEmptyEnum2::Foo(true));
89
- | ^^^^^^^^^^^^^^^^^^^^^^^^
95
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
90
96
|
91
97
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
92
98
93
- error[E0004]: non-exhaustive patterns: multiple patterns of type `NonEmptyEnum5` are not handled
94
- --> $DIR/match-empty-exhaustive_patterns.rs:70 :18
99
+ error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
100
+ --> $DIR/match-empty-exhaustive_patterns.rs:76 :18
95
101
|
96
102
LL | / enum NonEmptyEnum5 {
97
103
LL | | V1, V2, V3, V4, V5,
98
104
LL | | }
99
105
| |_- `NonEmptyEnum5` defined here
100
106
...
101
107
LL | match_empty!(NonEmptyEnum5::V1);
102
- | ^^^^^^^^^^^^^^^^^
108
+ | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
103
109
|
104
110
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
105
111
106
112
error[E0004]: non-exhaustive patterns: `0u8..=std::u8::MAX` not covered
107
- --> $DIR/match-empty-exhaustive_patterns.rs:73 :18
113
+ --> $DIR/match-empty-exhaustive_patterns.rs:79 :18
108
114
|
109
115
LL | match_false!(0u8);
110
116
| ^^^ pattern `0u8..=std::u8::MAX` not covered
111
117
|
112
118
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
113
119
114
120
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
115
- --> $DIR/match-empty-exhaustive_patterns.rs:75 :18
121
+ --> $DIR/match-empty-exhaustive_patterns.rs:81 :18
116
122
|
117
123
LL | struct NonEmptyStruct(bool);
118
124
| ---------------------------- `NonEmptyStruct` defined here
@@ -123,7 +129,7 @@ LL | match_false!(NonEmptyStruct(true));
123
129
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
124
130
125
131
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
126
- --> $DIR/match-empty-exhaustive_patterns.rs:77 :18
132
+ --> $DIR/match-empty-exhaustive_patterns.rs:83 :18
127
133
|
128
134
LL | / union NonEmptyUnion1 {
129
135
LL | | foo: (),
@@ -136,7 +142,7 @@ LL | match_false!((NonEmptyUnion1 { foo: () }));
136
142
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
137
143
138
144
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
139
- --> $DIR/match-empty-exhaustive_patterns.rs:79 :18
145
+ --> $DIR/match-empty-exhaustive_patterns.rs:85 :18
140
146
|
141
147
LL | / union NonEmptyUnion2 {
142
148
LL | | foo: (),
@@ -150,11 +156,13 @@ LL | match_false!((NonEmptyUnion2 { foo: () }));
150
156
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
151
157
152
158
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
153
- --> $DIR/match-empty-exhaustive_patterns.rs:81 :18
159
+ --> $DIR/match-empty-exhaustive_patterns.rs:87 :18
154
160
|
155
161
LL | / enum NonEmptyEnum1 {
156
162
LL | | Foo(bool),
157
163
| | --- not covered
164
+ LL | |
165
+ LL | |
158
166
LL | | }
159
167
| |_- `NonEmptyEnum1` defined here
160
168
...
@@ -164,13 +172,17 @@ LL | match_false!(NonEmptyEnum1::Foo(true));
164
172
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
165
173
166
174
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
167
- --> $DIR/match-empty-exhaustive_patterns.rs:83 :18
175
+ --> $DIR/match-empty-exhaustive_patterns.rs:89 :18
168
176
|
169
177
LL | / enum NonEmptyEnum2 {
170
178
LL | | Foo(bool),
171
179
| | --- not covered
180
+ LL | |
181
+ LL | |
172
182
LL | | Bar,
173
183
| | --- not covered
184
+ LL | |
185
+ LL | |
174
186
LL | | }
175
187
| |_- `NonEmptyEnum2` defined here
176
188
...
@@ -180,7 +192,7 @@ LL | match_false!(NonEmptyEnum2::Foo(true));
180
192
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
181
193
182
194
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
183
- --> $DIR/match-empty-exhaustive_patterns.rs:85 :18
195
+ --> $DIR/match-empty-exhaustive_patterns.rs:91 :18
184
196
|
185
197
LL | / enum NonEmptyEnum5 {
186
198
LL | | V1, V2, V3, V4, V5,
0 commit comments