]> git.proxmox.com Git - rustc.git/blob - src/test/ui/argument-suggestions/swapped_arguments.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / argument-suggestions / swapped_arguments.rs
1 struct X {}
2
3 fn two_args(_a: i32, _b: f32) {}
4 fn three_args(_a: i32, _b: f32, _c: &str) {}
5 fn four_args(_a: i32, _b: f32, _c: &str, _d: X) {}
6
7 fn main() {
8 two_args(1.0, 1); //~ ERROR arguments to this function are incorrect
9 three_args(1.0, 1, ""); //~ ERROR arguments to this function are incorrect
10 three_args( 1, "", 1.0); //~ ERROR arguments to this function are incorrect
11 three_args( "", 1.0, 1); //~ ERROR arguments to this function are incorrect
12
13 four_args(1.0, 1, X {}, ""); //~ ERROR arguments to this function are incorrect
14 }