summaryrefslogtreecommitdiffstats
path: root/src/test/ui/argument-suggestions/mixed_cases.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/argument-suggestions/mixed_cases.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/argument-suggestions/mixed_cases.stderr')
-rw-r--r--src/test/ui/argument-suggestions/mixed_cases.stderr117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/test/ui/argument-suggestions/mixed_cases.stderr b/src/test/ui/argument-suggestions/mixed_cases.stderr
new file mode 100644
index 000000000..a52a30d78
--- /dev/null
+++ b/src/test/ui/argument-suggestions/mixed_cases.stderr
@@ -0,0 +1,117 @@
+error[E0061]: this function takes 2 arguments but 3 arguments were supplied
+ --> $DIR/mixed_cases.rs:10:3
+ |
+LL | two_args(1, "", X {});
+ | ^^^^^^^^ -- ---- argument of type `X` unexpected
+ | |
+ | expected `f32`, found `&str`
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:5:4
+ |
+LL | fn two_args(_a: i32, _b: f32) {}
+ | ^^^^^^^^ ------- -------
+help: remove the extra argument
+ |
+LL | two_args(1, /* f32 */);
+ | ~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0061]: this function takes 3 arguments but 4 arguments were supplied
+ --> $DIR/mixed_cases.rs:11:3
+ |
+LL | three_args(1, "", X {}, "");
+ | ^^^^^^^^^^ -- ---- -- argument of type `&'static str` unexpected
+ | | |
+ | | argument of type `X` unexpected
+ | an argument of type `f32` is missing
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:6:4
+ |
+LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
+ | ^^^^^^^^^^ ------- ------- --------
+help: did you mean
+ |
+LL | three_args(1, /* f32 */, "");
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0061]: this function takes 3 arguments but 2 arguments were supplied
+ --> $DIR/mixed_cases.rs:14:3
+ |
+LL | three_args(1, X {});
+ | ^^^^^^^^^^---------
+ | | |
+ | | expected `f32`, found struct `X`
+ | an argument of type `&str` is missing
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:6:4
+ |
+LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
+ | ^^^^^^^^^^ ------- ------- --------
+help: provide the argument
+ |
+LL | three_args(1, /* f32 */, /* &str */);
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0308]: arguments to this function are incorrect
+ --> $DIR/mixed_cases.rs:17:3
+ |
+LL | three_args(1, "", X {});
+ | ^^^^^^^^^^ -- ---- argument of type `X` unexpected
+ | |
+ | an argument of type `f32` is missing
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:6:4
+ |
+LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
+ | ^^^^^^^^^^ ------- ------- --------
+help: did you mean
+ |
+LL | three_args(1, /* f32 */, "");
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0308]: arguments to this function are incorrect
+ --> $DIR/mixed_cases.rs:20:3
+ |
+LL | three_args("", X {}, 1);
+ | ^^^^^^^^^^ -- ---- - expected `&str`, found `{integer}`
+ | | |
+ | | expected `f32`, found struct `X`
+ | expected `i32`, found `&'static str`
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:6:4
+ |
+LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
+ | ^^^^^^^^^^ ------- ------- --------
+help: swap these arguments
+ |
+LL | three_args(1, /* f32 */, "");
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0061]: this function takes 3 arguments but 2 arguments were supplied
+ --> $DIR/mixed_cases.rs:23:3
+ |
+LL | three_args("", 1);
+ | ^^^^^^^^^^ -- -
+ | | |
+ | | an argument of type `f32` is missing
+ | | expected `&str`, found `{integer}`
+ | expected `i32`, found `&'static str`
+ |
+note: function defined here
+ --> $DIR/mixed_cases.rs:6:4
+ |
+LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
+ | ^^^^^^^^^^ ------- ------- --------
+help: did you mean
+ |
+LL | three_args(1, /* f32 */, "");
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0061, E0308.
+For more information about an error, try `rustc --explain E0061`.