1 // Test suggesting tuples where bare arguments may have been passed
2 // See issue #86481 for details.
7 let _: Result<(i32, i8), ()> = Ok(1, 2);
8 //~^ ERROR this enum variant takes 1 argument but 2 arguments were supplied
9 let _: Option<(i32, i8, &'static str)> = Some(1, 2, "hi");
10 //~^ ERROR this enum variant takes 1 argument but 3 arguments were supplied
11 let _: Option<()> = Some();
12 //~^ ERROR this enum variant takes 1 argument but 0 arguments were supplied
14 let _: Option<(i32,)> = Some(3);
15 //~^ ERROR mismatched types
17 let _: Option<(i32,)> = Some((3));
18 //~^ ERROR mismatched types
20 two_ints(1, 2); //~ ERROR this function takes 1 argument
22 with_generic(3, 4); //~ ERROR this function takes 1 argument
25 fn two_ints(_: (i32, i32)) {
28 fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
30 // test generics/bound handling
31 with_generic(a, b); //~ ERROR this function takes 1 argument