1 error[E0530]: match bindings cannot shadow tuple structs
2 --> $DIR/pat-tuple-field-count-cross.rs:13:9
4 LL | use declarations_for_tuple_field_count_errors::*;
5 | -------------------------------------------- the tuple struct `Z1` is imported here
10 | cannot be named the same as a tuple struct
11 | help: try specify the pattern arguments: `Z1(..)`
13 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
14 --> $DIR/pat-tuple-field-count-cross.rs:9:9
19 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:1:1
22 | ------------- `Z0` defined here
24 | ------------- similarly named tuple struct `Z1` defined here
26 help: use this syntax instead
30 help: a tuple struct with a similar name exists
35 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
36 --> $DIR/pat-tuple-field-count-cross.rs:10:9
41 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:1:1
44 | ------------- `Z0` defined here
46 | ------------- similarly named tuple struct `Z1` defined here
48 help: use this syntax instead
52 help: a tuple struct with a similar name exists
57 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
58 --> $DIR/pat-tuple-field-count-cross.rs:31:9
63 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:15
65 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
66 | -- -- similarly named tuple variant `Z1` defined here
68 | `E1::Z0` defined here
70 help: use this syntax instead
74 help: a tuple variant with a similar name exists
79 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
80 --> $DIR/pat-tuple-field-count-cross.rs:32:9
85 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:15
87 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
88 | -- -- similarly named tuple variant `Z1` defined here
90 | `E1::Z0` defined here
92 help: use this syntax instead
96 help: a tuple variant with a similar name exists
101 error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1`
102 --> $DIR/pat-tuple-field-count-cross.rs:35:9
107 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:19
109 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
110 | -- -- `E1::Z1` defined here
112 | similarly named unit variant `Z0` defined here
114 help: use the tuple variant pattern syntax instead
116 LL | E1::Z1(/* fields */) => {}
117 | ~~~~~~~~~~~~~~~~~~~~
118 help: a unit variant with a similar name exists
123 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields
124 --> $DIR/pat-tuple-field-count-cross.rs:14:12
127 | ^ expected 0 fields, found 1
129 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:2:1
131 LL | pub struct Z1();
132 | ------------- tuple struct has 0 fields
134 error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
135 --> $DIR/pat-tuple-field-count-cross.rs:18:9
138 | ^^^ expected 3 fields, found 0
140 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:4:14
142 LL | pub struct S(pub u8, pub u8, pub u8);
143 | ------ ------ ------ tuple struct has 3 fields
145 help: use `_` to explicitly ignore each field
147 LL | S(_, _, _) => {}
149 help: use `..` to ignore all fields
154 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 3 fields
155 --> $DIR/pat-tuple-field-count-cross.rs:19:11
158 | ^ expected 3 fields, found 1
160 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:4:14
162 LL | pub struct S(pub u8, pub u8, pub u8);
163 | ------ ------ ------ tuple struct has 3 fields
165 help: use `_` to explicitly ignore each field
167 LL | S(1, _, _) => {}
169 help: use `..` to ignore the rest of the fields
174 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
175 --> $DIR/pat-tuple-field-count-cross.rs:20:11
177 LL | S(xyz, abc) => {}
178 | ^^^ ^^^ expected 3 fields, found 2
180 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:4:14
182 LL | pub struct S(pub u8, pub u8, pub u8);
183 | ------ ------ ------ tuple struct has 3 fields
185 help: use `_` to explicitly ignore each field
187 LL | S(xyz, abc, _) => {}
190 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
191 --> $DIR/pat-tuple-field-count-cross.rs:21:11
193 LL | S(1, 2, 3, 4) => {}
194 | ^ ^ ^ ^ expected 3 fields, found 4
196 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:4:14
198 LL | pub struct S(pub u8, pub u8, pub u8);
199 | ------ ------ ------ tuple struct has 3 fields
201 error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
202 --> $DIR/pat-tuple-field-count-cross.rs:24:9
205 | ^^^ expected 3 fields, found 0
207 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
210 | - tuple struct defined here
216 | ------ tuple struct has 3 fields
218 help: use `_` to explicitly ignore each field
220 LL | M(_, _, _) => {}
222 help: use `..` to ignore all fields
227 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 3 fields
228 --> $DIR/pat-tuple-field-count-cross.rs:25:11
231 | ^ expected 3 fields, found 1
233 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
236 | - tuple struct defined here
242 | ------ tuple struct has 3 fields
244 help: use `_` to explicitly ignore each field
246 LL | M(1, _, _) => {}
248 help: use `..` to ignore the rest of the fields
253 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
254 --> $DIR/pat-tuple-field-count-cross.rs:26:11
256 LL | M(xyz, abc) => {}
257 | ^^^ ^^^ expected 3 fields, found 2
259 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
262 | - tuple struct defined here
268 | ------ tuple struct has 3 fields
270 help: use `_` to explicitly ignore each field
272 LL | M(xyz, abc, _) => {}
275 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
276 --> $DIR/pat-tuple-field-count-cross.rs:27:11
278 LL | M(1, 2, 3, 4) => {}
279 | ^ ^ ^ ^ expected 3 fields, found 4
281 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
284 | - tuple struct defined here
290 | ------ tuple struct has 3 fields
292 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
293 --> $DIR/pat-tuple-field-count-cross.rs:36:16
296 | ^ expected 0 fields, found 1
298 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:19
300 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
301 | -- tuple variant has 0 fields
303 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
304 --> $DIR/pat-tuple-field-count-cross.rs:39:9
307 | ^^^^^^^ expected 3 fields, found 0
309 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:27
311 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
312 | -- -- -- tuple variant has 3 fields
314 help: use `_` to explicitly ignore each field
316 LL | E1::S(_, _, _) => {}
318 help: use `..` to ignore all fields
323 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
324 --> $DIR/pat-tuple-field-count-cross.rs:40:15
327 | ^ expected 3 fields, found 1
329 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:27
331 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
332 | -- -- -- tuple variant has 3 fields
334 help: use `_` to explicitly ignore each field
336 LL | E1::S(1, _, _) => {}
338 help: use `..` to ignore the rest of the fields
340 LL | E1::S(1, ..) => {}
343 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
344 --> $DIR/pat-tuple-field-count-cross.rs:41:15
346 LL | E1::S(xyz, abc) => {}
347 | ^^^ ^^^ expected 3 fields, found 2
349 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:27
351 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
352 | -- -- -- tuple variant has 3 fields
354 help: use `_` to explicitly ignore each field
356 LL | E1::S(xyz, abc, _) => {}
359 error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
360 --> $DIR/pat-tuple-field-count-cross.rs:42:15
362 LL | E1::S(1, 2, 3, 4) => {}
363 | ^ ^ ^ ^ expected 3 fields, found 4
365 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:11:27
367 LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
368 | -- -- -- tuple variant has 3 fields
370 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
371 --> $DIR/pat-tuple-field-count-cross.rs:46:9
374 | ^^^^^^^ expected 3 fields, found 0
376 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:14:7
379 | -- -- -- tuple variant has 3 fields
381 help: use `_` to explicitly ignore each field
383 LL | E2::S(_, _, _) => {}
385 help: use `..` to ignore all fields
390 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
391 --> $DIR/pat-tuple-field-count-cross.rs:47:15
394 | ^ expected 3 fields, found 1
396 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:14:7
399 | -- -- -- tuple variant has 3 fields
401 help: use `_` to explicitly ignore each field
403 LL | E2::S(1, _, _) => {}
405 help: use `..` to ignore the rest of the fields
407 LL | E2::S(1, ..) => {}
410 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
411 --> $DIR/pat-tuple-field-count-cross.rs:48:15
413 LL | E2::S(xyz, abc) => {}
414 | ^^^ ^^^ expected 3 fields, found 2
416 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:14:7
419 | -- -- -- tuple variant has 3 fields
421 help: use `_` to explicitly ignore each field
423 LL | E2::S(xyz, abc, _) => {}
426 error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
427 --> $DIR/pat-tuple-field-count-cross.rs:49:15
429 LL | E2::S(1, 2, 3, 4) => {}
430 | ^ ^ ^ ^ expected 3 fields, found 4
432 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:14:7
435 | -- -- -- tuple variant has 3 fields
437 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
438 --> $DIR/pat-tuple-field-count-cross.rs:52:9
441 | ^^^^^^^ expected 3 fields, found 0
443 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
446 | - tuple variant defined here
452 | -- tuple variant has 3 fields
454 help: use `_` to explicitly ignore each field
456 LL | E2::M(_, _, _) => {}
458 help: use `..` to ignore all fields
463 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
464 --> $DIR/pat-tuple-field-count-cross.rs:53:15
467 | ^ expected 3 fields, found 1
469 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
472 | - tuple variant defined here
478 | -- tuple variant has 3 fields
480 help: use `_` to explicitly ignore each field
482 LL | E2::M(1, _, _) => {}
484 help: use `..` to ignore the rest of the fields
486 LL | E2::M(1, ..) => {}
489 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
490 --> $DIR/pat-tuple-field-count-cross.rs:54:15
492 LL | E2::M(xyz, abc) => {}
493 | ^^^ ^^^ expected 3 fields, found 2
495 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
498 | - tuple variant defined here
504 | -- tuple variant has 3 fields
506 help: use `_` to explicitly ignore each field
508 LL | E2::M(xyz, abc, _) => {}
511 error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
512 --> $DIR/pat-tuple-field-count-cross.rs:55:15
514 LL | E2::M(1, 2, 3, 4) => {}
515 | ^ ^ ^ ^ expected 3 fields, found 4
517 ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
520 | - tuple variant defined here
526 | -- tuple variant has 3 fields
528 error: aborting due to 28 previous errors
530 Some errors have detailed explanations: E0023, E0530, E0532.
531 For more information about an error, try `rustc --explain E0023`.