2013-06-07 15:06:36 -05:00
|
|
|
// Issue #6155
|
|
|
|
|
2014-12-05 20:12:25 -06:00
|
|
|
fn first((value, _): (isize, f64)) -> isize { value }
|
2013-06-07 15:06:36 -05:00
|
|
|
|
|
|
|
fn main() {
|
2014-08-06 04:59:40 -05:00
|
|
|
let y = first ((1,2.0,3));
|
2015-01-12 00:01:44 -06:00
|
|
|
//~^ ERROR mismatched types
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| expected tuple `(isize, f64)`
|
|
|
|
//~| found tuple `(isize, f64, {integer})`
|
2016-04-20 13:42:13 -05:00
|
|
|
//~| expected a tuple with 2 elements, found one with 3 elements
|
2014-10-23 15:48:32 -05:00
|
|
|
|
|
|
|
let y = first ((1,));
|
2015-01-12 00:01:44 -06:00
|
|
|
//~^ ERROR mismatched types
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| expected tuple `(isize, f64)`
|
|
|
|
//~| found tuple `(isize,)`
|
2019-05-27 08:28:20 -05:00
|
|
|
//~| expected a tuple with 2 elements, found one with 1 element
|
2013-06-07 15:06:36 -05:00
|
|
|
}
|