]> git.proxmox.com Git - rustc.git/blame - src/test/ui/argument-suggestions/mixed_cases.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / argument-suggestions / mixed_cases.rs
CommitLineData
04454e1e
FG
1// Cases where multiple argument suggestions are mixed
2
3struct X {}
4
5fn two_args(_a: i32, _b: f32) {}
6fn three_args(_a: i32, _b: f32, _c: &str) {}
7
8fn 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
17 three_args(1, "", X {});
18 //~^ ERROR mismatched types
19 //~| ERROR mismatched types
20
21 // Swapped and Invalid
22 three_args("", X {}, 1);
23 //~^ ERROR mismatched types
24 //~| ERROR mismatched types
25 //~| ERROR mismatched types
26
27 // Swapped and missing
28 three_args("", 1); //~ ERROR this function takes
29}