35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
|
error[E0308]: mismatched types
|
||
|
--> $DIR/pat-tuple-overfield.rs:15:9
|
||
|
|
|
||
|
LL | (1, 2, 3, 4) => {} //~ ERROR mismatched types
|
||
|
| ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
|
||
|
|
|
||
|
= note: expected type `({integer}, {integer}, {integer})`
|
||
|
found type `(_, _, _, _)`
|
||
|
|
||
|
error[E0308]: mismatched types
|
||
|
--> $DIR/pat-tuple-overfield.rs:16:9
|
||
|
|
|
||
|
LL | (1, 2, .., 3, 4) => {} //~ ERROR mismatched types
|
||
|
| ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
|
||
|
|
|
||
|
= note: expected type `({integer}, {integer}, {integer})`
|
||
|
found type `(_, _, _, _)`
|
||
|
|
||
|
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
|
||
|
--> $DIR/pat-tuple-overfield.rs:20:9
|
||
|
|
|
||
|
LL | S(1, 2, 3, 4) => {}
|
||
|
| ^^^^^^^^^^^^^ expected 3 fields, found 4
|
||
|
|
||
|
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
|
||
|
--> $DIR/pat-tuple-overfield.rs:22:9
|
||
|
|
|
||
|
LL | S(1, 2, .., 3, 4) => {}
|
||
|
| ^^^^^^^^^^^^^^^^^ expected 3 fields, found 4
|
||
|
|
||
|
error: aborting due to 4 previous errors
|
||
|
|
||
|
Some errors occurred: E0023, E0308.
|
||
|
For more information about an error, try `rustc --explain E0023`.
|