|
1 | 1 | error: unreachable pattern |
2 | | - --> $DIR/empty-match.rs:53:9 |
| 2 | + --> $DIR/empty-match.rs:37:9 |
3 | 3 | | |
4 | 4 | LL | _ => {}, |
5 | 5 | | ^ |
6 | 6 | | |
7 | 7 | note: the lint level is defined here |
8 | | - --> $DIR/empty-match.rs:6:9 |
| 8 | + --> $DIR/empty-match.rs:8:9 |
9 | 9 | | |
10 | 10 | LL | #![deny(unreachable_patterns)] |
11 | 11 | | ^^^^^^^^^^^^^^^^^^^^ |
12 | 12 |
|
13 | 13 | error: unreachable pattern |
14 | | - --> $DIR/empty-match.rs:56:9 |
| 14 | + --> $DIR/empty-match.rs:40:9 |
15 | 15 | | |
16 | 16 | LL | _ if false => {}, |
17 | 17 | | ^ |
18 | 18 |
|
19 | 19 | error: unreachable pattern |
20 | | - --> $DIR/empty-match.rs:63:9 |
| 20 | + --> $DIR/empty-match.rs:47:9 |
21 | 21 | | |
22 | 22 | LL | _ => {}, |
23 | 23 | | ^ |
24 | 24 |
|
25 | 25 | error: unreachable pattern |
26 | | - --> $DIR/empty-match.rs:66:9 |
| 26 | + --> $DIR/empty-match.rs:50:9 |
27 | 27 | | |
28 | 28 | LL | _ if false => {}, |
29 | 29 | | ^ |
30 | 30 |
|
31 | 31 | error: unreachable pattern |
32 | | - --> $DIR/empty-match.rs:73:9 |
| 32 | + --> $DIR/empty-match.rs:57:9 |
33 | 33 | | |
34 | 34 | LL | _ => {}, |
35 | 35 | | ^ |
36 | 36 |
|
37 | 37 | error: unreachable pattern |
38 | | - --> $DIR/empty-match.rs:76:9 |
| 38 | + --> $DIR/empty-match.rs:60:9 |
39 | 39 | | |
40 | 40 | LL | _ if false => {}, |
41 | 41 | | ^ |
42 | 42 |
|
43 | | -error: unreachable pattern |
44 | | - --> $DIR/empty-match.rs:83:9 |
| 43 | +error[E0004]: non-exhaustive patterns: type `u8` is non-empty |
| 44 | + --> $DIR/empty-match.rs:78:20 |
45 | 45 | | |
46 | | -LL | Some(_) => {} |
47 | | - | ^^^^^^^ |
48 | | - |
49 | | -error: unreachable pattern |
50 | | - --> $DIR/empty-match.rs:87:9 |
| 46 | +LL | match_no_arms!(0u8); |
| 47 | + | ^^^ |
51 | 48 | | |
52 | | -LL | Some(_) => {} |
53 | | - | ^^^^^^^ |
| 49 | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
| 50 | + = note: the matched value is of type `u8` |
54 | 51 |
|
55 | | -error[E0004]: non-exhaustive patterns: type `u8` is non-empty |
56 | | - --> $DIR/empty-match.rs:90:18 |
| 52 | +error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty |
| 53 | + --> $DIR/empty-match.rs:79:20 |
57 | 54 | | |
58 | | -LL | match_empty!(0u8); |
59 | | - | ^^^ |
| 55 | +LL | struct NonEmptyStruct1; |
| 56 | + | ----------------------- `NonEmptyStruct1` defined here |
| 57 | +... |
| 58 | +LL | match_no_arms!(NonEmptyStruct1); |
| 59 | + | ^^^^^^^^^^^^^^^ |
60 | 60 | | |
61 | 61 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
62 | | - = note: the matched value is of type `u8` |
| 62 | + = note: the matched value is of type `NonEmptyStruct1` |
63 | 63 |
|
64 | | -error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty |
65 | | - --> $DIR/empty-match.rs:92:18 |
| 64 | +error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty |
| 65 | + --> $DIR/empty-match.rs:80:20 |
66 | 66 | | |
67 | | -LL | struct NonEmptyStruct(bool); |
68 | | - | ---------------------------- `NonEmptyStruct` defined here |
| 67 | +LL | struct NonEmptyStruct2(bool); |
| 68 | + | ----------------------------- `NonEmptyStruct2` defined here |
69 | 69 | ... |
70 | | -LL | match_empty!(NonEmptyStruct(true)); |
71 | | - | ^^^^^^^^^^^^^^^^^^^^ |
| 70 | +LL | match_no_arms!(NonEmptyStruct2(true)); |
| 71 | + | ^^^^^^^^^^^^^^^^^^^^^ |
72 | 72 | | |
73 | 73 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
74 | | - = note: the matched value is of type `NonEmptyStruct` |
| 74 | + = note: the matched value is of type `NonEmptyStruct2` |
75 | 75 |
|
76 | 76 | error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty |
77 | | - --> $DIR/empty-match.rs:94:18 |
| 77 | + --> $DIR/empty-match.rs:81:20 |
78 | 78 | | |
79 | 79 | LL | / union NonEmptyUnion1 { |
80 | 80 | LL | | foo: (), |
81 | 81 | LL | | } |
82 | 82 | | |_- `NonEmptyUnion1` defined here |
83 | 83 | ... |
84 | | -LL | match_empty!((NonEmptyUnion1 { foo: () })); |
85 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 84 | +LL | match_no_arms!((NonEmptyUnion1 { foo: () })); |
| 85 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
86 | 86 | | |
87 | 87 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
88 | 88 | = note: the matched value is of type `NonEmptyUnion1` |
89 | 89 |
|
90 | 90 | error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty |
91 | | - --> $DIR/empty-match.rs:96:18 |
| 91 | + --> $DIR/empty-match.rs:82:20 |
92 | 92 | | |
93 | 93 | LL | / union NonEmptyUnion2 { |
94 | 94 | LL | | foo: (), |
95 | 95 | LL | | bar: (), |
96 | 96 | LL | | } |
97 | 97 | | |_- `NonEmptyUnion2` defined here |
98 | 98 | ... |
99 | | -LL | match_empty!((NonEmptyUnion2 { foo: () })); |
100 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 99 | +LL | match_no_arms!((NonEmptyUnion2 { foo: () })); |
| 100 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
101 | 101 | | |
102 | 102 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
103 | 103 | = note: the matched value is of type `NonEmptyUnion2` |
104 | 104 |
|
105 | 105 | error[E0004]: non-exhaustive patterns: `Foo(_)` not covered |
106 | | - --> $DIR/empty-match.rs:98:18 |
| 106 | + --> $DIR/empty-match.rs:83:20 |
107 | 107 | | |
108 | 108 | LL | / enum NonEmptyEnum1 { |
109 | 109 | LL | | Foo(bool), |
110 | 110 | | | --- not covered |
111 | | -LL | | |
112 | | -LL | | |
113 | 111 | LL | | } |
114 | 112 | | |_- `NonEmptyEnum1` defined here |
115 | 113 | ... |
116 | | -LL | match_empty!(NonEmptyEnum1::Foo(true)); |
117 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered |
| 114 | +LL | match_no_arms!(NonEmptyEnum1::Foo(true)); |
| 115 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered |
118 | 116 | | |
119 | 117 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
120 | 118 | = note: the matched value is of type `NonEmptyEnum1` |
121 | 119 |
|
122 | 120 | error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered |
123 | | - --> $DIR/empty-match.rs:100:18 |
| 121 | + --> $DIR/empty-match.rs:84:20 |
124 | 122 | | |
125 | 123 | LL | / enum NonEmptyEnum2 { |
126 | 124 | LL | | Foo(bool), |
127 | 125 | | | --- not covered |
128 | | -LL | | |
129 | | -LL | | |
130 | 126 | LL | | Bar, |
131 | 127 | | | --- not covered |
132 | | -LL | | |
133 | | -LL | | |
134 | 128 | LL | | } |
135 | 129 | | |_- `NonEmptyEnum2` defined here |
136 | 130 | ... |
137 | | -LL | match_empty!(NonEmptyEnum2::Foo(true)); |
138 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered |
| 131 | +LL | match_no_arms!(NonEmptyEnum2::Foo(true)); |
| 132 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered |
139 | 133 | | |
140 | 134 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
141 | 135 | = note: the matched value is of type `NonEmptyEnum2` |
142 | 136 |
|
143 | 137 | error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered |
144 | | - --> $DIR/empty-match.rs:102:18 |
| 138 | + --> $DIR/empty-match.rs:85:20 |
145 | 139 | | |
146 | 140 | LL | / enum NonEmptyEnum5 { |
147 | 141 | LL | | V1, V2, V3, V4, V5, |
148 | 142 | LL | | } |
149 | 143 | | |_- `NonEmptyEnum5` defined here |
150 | 144 | ... |
151 | | -LL | match_empty!(NonEmptyEnum5::V1); |
152 | | - | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered |
| 145 | +LL | match_no_arms!(NonEmptyEnum5::V1); |
| 146 | + | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered |
153 | 147 | | |
154 | 148 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
155 | 149 | = note: the matched value is of type `NonEmptyEnum5` |
156 | 150 |
|
157 | 151 | error[E0004]: non-exhaustive patterns: `_` not covered |
158 | | - --> $DIR/empty-match.rs:105:18 |
| 152 | + --> $DIR/empty-match.rs:87:24 |
159 | 153 | | |
160 | | -LL | match_false!(0u8); |
161 | | - | ^^^ pattern `_` not covered |
| 154 | +LL | match_guarded_arm!(0u8); |
| 155 | + | ^^^ pattern `_` not covered |
162 | 156 | | |
163 | 157 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
164 | 158 | = note: the matched value is of type `u8` |
165 | 159 |
|
166 | | -error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered |
167 | | - --> $DIR/empty-match.rs:107:18 |
| 160 | +error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered |
| 161 | + --> $DIR/empty-match.rs:88:24 |
| 162 | + | |
| 163 | +LL | struct NonEmptyStruct1; |
| 164 | + | ----------------------- `NonEmptyStruct1` defined here |
| 165 | +... |
| 166 | +LL | match_guarded_arm!(NonEmptyStruct1); |
| 167 | + | ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered |
| 168 | + | |
| 169 | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
| 170 | + = note: the matched value is of type `NonEmptyStruct1` |
| 171 | + |
| 172 | +error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered |
| 173 | + --> $DIR/empty-match.rs:89:24 |
168 | 174 | | |
169 | | -LL | struct NonEmptyStruct(bool); |
170 | | - | ---------------------------- `NonEmptyStruct` defined here |
| 175 | +LL | struct NonEmptyStruct2(bool); |
| 176 | + | ----------------------------- `NonEmptyStruct2` defined here |
171 | 177 | ... |
172 | | -LL | match_false!(NonEmptyStruct(true)); |
173 | | - | ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered |
| 178 | +LL | match_guarded_arm!(NonEmptyStruct2(true)); |
| 179 | + | ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered |
174 | 180 | | |
175 | 181 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
176 | | - = note: the matched value is of type `NonEmptyStruct` |
| 182 | + = note: the matched value is of type `NonEmptyStruct2` |
177 | 183 |
|
178 | 184 | error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered |
179 | | - --> $DIR/empty-match.rs:109:18 |
| 185 | + --> $DIR/empty-match.rs:90:24 |
180 | 186 | | |
181 | 187 | LL | / union NonEmptyUnion1 { |
182 | 188 | LL | | foo: (), |
183 | 189 | LL | | } |
184 | 190 | | |_- `NonEmptyUnion1` defined here |
185 | 191 | ... |
186 | | -LL | match_false!((NonEmptyUnion1 { foo: () })); |
187 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered |
| 192 | +LL | match_guarded_arm!((NonEmptyUnion1 { foo: () })); |
| 193 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered |
188 | 194 | | |
189 | 195 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
190 | 196 | = note: the matched value is of type `NonEmptyUnion1` |
191 | 197 |
|
192 | 198 | error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered |
193 | | - --> $DIR/empty-match.rs:111:18 |
| 199 | + --> $DIR/empty-match.rs:91:24 |
194 | 200 | | |
195 | 201 | LL | / union NonEmptyUnion2 { |
196 | 202 | LL | | foo: (), |
197 | 203 | LL | | bar: (), |
198 | 204 | LL | | } |
199 | 205 | | |_- `NonEmptyUnion2` defined here |
200 | 206 | ... |
201 | | -LL | match_false!((NonEmptyUnion2 { foo: () })); |
202 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered |
| 207 | +LL | match_guarded_arm!((NonEmptyUnion2 { foo: () })); |
| 208 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered |
203 | 209 | | |
204 | 210 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
205 | 211 | = note: the matched value is of type `NonEmptyUnion2` |
206 | 212 |
|
207 | 213 | error[E0004]: non-exhaustive patterns: `Foo(_)` not covered |
208 | | - --> $DIR/empty-match.rs:113:18 |
| 214 | + --> $DIR/empty-match.rs:92:24 |
209 | 215 | | |
210 | 216 | LL | / enum NonEmptyEnum1 { |
211 | 217 | LL | | Foo(bool), |
212 | 218 | | | --- not covered |
213 | | -LL | | |
214 | | -LL | | |
215 | 219 | LL | | } |
216 | 220 | | |_- `NonEmptyEnum1` defined here |
217 | 221 | ... |
218 | | -LL | match_false!(NonEmptyEnum1::Foo(true)); |
219 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered |
| 222 | +LL | match_guarded_arm!(NonEmptyEnum1::Foo(true)); |
| 223 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered |
220 | 224 | | |
221 | 225 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
222 | 226 | = note: the matched value is of type `NonEmptyEnum1` |
223 | 227 |
|
224 | 228 | error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered |
225 | | - --> $DIR/empty-match.rs:115:18 |
| 229 | + --> $DIR/empty-match.rs:93:24 |
226 | 230 | | |
227 | 231 | LL | / enum NonEmptyEnum2 { |
228 | 232 | LL | | Foo(bool), |
229 | 233 | | | --- not covered |
230 | | -LL | | |
231 | | -LL | | |
232 | 234 | LL | | Bar, |
233 | 235 | | | --- not covered |
234 | | -LL | | |
235 | | -LL | | |
236 | 236 | LL | | } |
237 | 237 | | |_- `NonEmptyEnum2` defined here |
238 | 238 | ... |
239 | | -LL | match_false!(NonEmptyEnum2::Foo(true)); |
240 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered |
| 239 | +LL | match_guarded_arm!(NonEmptyEnum2::Foo(true)); |
| 240 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered |
241 | 241 | | |
242 | 242 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
243 | 243 | = note: the matched value is of type `NonEmptyEnum2` |
244 | 244 |
|
245 | 245 | error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered |
246 | | - --> $DIR/empty-match.rs:117:18 |
| 246 | + --> $DIR/empty-match.rs:94:24 |
247 | 247 | | |
248 | 248 | LL | / enum NonEmptyEnum5 { |
249 | 249 | LL | | V1, V2, V3, V4, V5, |
250 | 250 | LL | | } |
251 | 251 | | |_- `NonEmptyEnum5` defined here |
252 | 252 | ... |
253 | | -LL | match_false!(NonEmptyEnum5::V1); |
254 | | - | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered |
| 253 | +LL | match_guarded_arm!(NonEmptyEnum5::V1); |
| 254 | + | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered |
255 | 255 | | |
256 | 256 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
257 | 257 | = note: the matched value is of type `NonEmptyEnum5` |
|
0 commit comments