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