fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB35 linesraw
1error[E0308]: mismatched types
2  --> $DIR/tuple-arity-mismatch.rs:6:20
3   |
4LL |     let y = first ((1,2.0,3));
5   |             -----  ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
6   |             |
7   |             arguments to this function are incorrect
8   |
9   = note: expected tuple `(isize, f64)`
10              found tuple `(isize, f64, {integer})`
11note: function defined here
12  --> $DIR/tuple-arity-mismatch.rs:3:4
13   |
14LL | fn first((value, _): (isize, f64)) -> isize { value }
15   |    ^^^^^ ------------------------
16
17error[E0308]: mismatched types
18  --> $DIR/tuple-arity-mismatch.rs:12:20
19   |
20LL |     let y = first ((1,));
21   |             -----  ^^^^ expected a tuple with 2 elements, found one with 1 element
22   |             |
23   |             arguments to this function are incorrect
24   |
25   = note: expected tuple `(isize, f64)`
26              found tuple `(isize,)`
27note: function defined here
28  --> $DIR/tuple-arity-mismatch.rs:3:4
29   |
30LL | fn first((value, _): (isize, f64)) -> isize { value }
31   |    ^^^^^ ------------------------
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0308`.