]>
Commit | Line | Data |
---|---|---|
04454e1e FG |
1 | // Cases where multiple argument suggestions are mixed |
2 | ||
3 | struct X {} | |
4 | ||
5 | fn two_args(_a: i32, _b: f32) {} | |
6 | fn three_args(_a: i32, _b: f32, _c: &str) {} | |
7 | ||
8 | fn main() { | |
9 | // Extra + Invalid | |
10 | two_args(1, "", X {}); //~ ERROR this function takes | |
11 | three_args(1, "", X {}, ""); //~ ERROR this function takes | |
12 | ||
13 | // Missing and Invalid | |
14 | three_args(1, X {}); //~ ERROR this function takes | |
15 | ||
16 | // Missing and Extra | |
923072b8 | 17 | three_args(1, "", X {}); //~ ERROR arguments to this function are incorrect |
04454e1e FG |
18 | |
19 | // Swapped and Invalid | |
923072b8 | 20 | three_args("", X {}, 1); //~ ERROR arguments to this function are incorrect |
04454e1e FG |
21 | |
22 | // Swapped and missing | |
23 | three_args("", 1); //~ ERROR this function takes | |
24 | } |