From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/argument-suggestions/swapped_arguments.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/ui/argument-suggestions/swapped_arguments.rs (limited to 'src/test/ui/argument-suggestions/swapped_arguments.rs') diff --git a/src/test/ui/argument-suggestions/swapped_arguments.rs b/src/test/ui/argument-suggestions/swapped_arguments.rs new file mode 100644 index 000000000..a21de610c --- /dev/null +++ b/src/test/ui/argument-suggestions/swapped_arguments.rs @@ -0,0 +1,14 @@ +struct X {} + +fn two_args(_a: i32, _b: f32) {} +fn three_args(_a: i32, _b: f32, _c: &str) {} +fn four_args(_a: i32, _b: f32, _c: &str, _d: X) {} + +fn main() { + two_args(1.0, 1); //~ ERROR arguments to this function are incorrect + three_args(1.0, 1, ""); //~ ERROR arguments to this function are incorrect + three_args( 1, "", 1.0); //~ ERROR arguments to this function are incorrect + three_args( "", 1.0, 1); //~ ERROR arguments to this function are incorrect + + four_args(1.0, 1, X {}, ""); //~ ERROR arguments to this function are incorrect +} -- cgit v1.2.3