mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/tuple-arity-mismatch.rs:6:20
|
|
|
|
|
LL | let y = first ((1,2.0,3));
|
|
| ----- ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
|
|
| |
|
|
| arguments to this function are incorrect
|
|
|
|
|
= note: expected tuple `(isize, f64)`
|
|
found tuple `(isize, f64, {integer})`
|
|
note: function defined here
|
|
--> $DIR/tuple-arity-mismatch.rs:3:4
|
|
|
|
|
LL | fn first((value, _): (isize, f64)) -> isize { value }
|
|
| ^^^^^ ------------------------
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/tuple-arity-mismatch.rs:12:20
|
|
|
|
|
LL | let y = first ((1,));
|
|
| ----- ^^^^ expected a tuple with 2 elements, found one with 1 element
|
|
| |
|
|
| arguments to this function are incorrect
|
|
|
|
|
= note: expected tuple `(isize, f64)`
|
|
found tuple `(isize,)`
|
|
note: function defined here
|
|
--> $DIR/tuple-arity-mismatch.rs:3:4
|
|
|
|
|
LL | fn first((value, _): (isize, f64)) -> isize { value }
|
|
| ^^^^^ ------------------------
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|