]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/pat-tuple-overfield.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / pattern / pat-tuple-overfield.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/pat-tuple-overfield.rs:5:9
b7449926 3 |
532ac7d7 4LL | (1, 2, 3, 4) => {}
b7449926
XL
5 | ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
6 |
60c5eb7d
XL
7 = note: expected tuple `({integer}, {integer}, {integer})`
8 found tuple `(_, _, _, _)`
b7449926
XL
9
10error[E0308]: mismatched types
0731742a 11 --> $DIR/pat-tuple-overfield.rs:6:9
b7449926 12 |
532ac7d7 13LL | (1, 2, .., 3, 4) => {}
b7449926
XL
14 | ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
15 |
60c5eb7d
XL
16 = note: expected tuple `({integer}, {integer}, {integer})`
17 found tuple `(_, _, _, _)`
b7449926
XL
18
19error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
0731742a 20 --> $DIR/pat-tuple-overfield.rs:10:9
b7449926 21 |
e1599b0c
XL
22LL | struct S(u8, u8, u8);
23 | --------------------- tuple struct defined here
24...
b7449926
XL
25LL | S(1, 2, 3, 4) => {}
26 | ^^^^^^^^^^^^^ expected 3 fields, found 4
27
28error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
0731742a 29 --> $DIR/pat-tuple-overfield.rs:12:9
b7449926 30 |
e1599b0c
XL
31LL | struct S(u8, u8, u8);
32 | --------------------- tuple struct defined here
33...
b7449926
XL
34LL | S(1, 2, .., 3, 4) => {}
35 | ^^^^^^^^^^^^^^^^^ expected 3 fields, found 4
36
37error: aborting due to 4 previous errors
38
48663c56 39Some errors have detailed explanations: E0023, E0308.
b7449926 40For more information about an error, try `rustc --explain E0023`.