diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/argument-suggestions/issue-109425.fixed | 4 | ||||
| -rw-r--r-- | tests/ui/argument-suggestions/issue-109425.rs | 4 | ||||
| -rw-r--r-- | tests/ui/argument-suggestions/issue-109425.stderr | 42 | ||||
| -rw-r--r-- | tests/ui/argument-suggestions/issue-112507.stderr | 5 |
4 files changed, 51 insertions, 4 deletions
diff --git a/tests/ui/argument-suggestions/issue-109425.fixed b/tests/ui/argument-suggestions/issue-109425.fixed index 5d96f457c88..4b3aaa46d86 100644 --- a/tests/ui/argument-suggestions/issue-109425.fixed +++ b/tests/ui/argument-suggestions/issue-109425.fixed @@ -15,6 +15,10 @@ fn main() { //~^ error: this function takes 1 argument but 3 arguments were supplied is(0, ""); // is(0, "") //~^ error: this function takes 2 arguments but 4 arguments were supplied + is(1, ""); + //~^ error: this function takes 2 arguments but 4 arguments were supplied + is(1, ""); + //~^ error: this function takes 2 arguments but 4 arguments were supplied s(""); // s("") //~^ error: this function takes 1 argument but 3 arguments were supplied } diff --git a/tests/ui/argument-suggestions/issue-109425.rs b/tests/ui/argument-suggestions/issue-109425.rs index bb9d37ee0ff..56816681337 100644 --- a/tests/ui/argument-suggestions/issue-109425.rs +++ b/tests/ui/argument-suggestions/issue-109425.rs @@ -15,6 +15,10 @@ fn main() { //~^ error: this function takes 1 argument but 3 arguments were supplied is(0, 1, 2, ""); // is(0, "") //~^ error: this function takes 2 arguments but 4 arguments were supplied + is((), 1, "", ()); + //~^ error: this function takes 2 arguments but 4 arguments were supplied + is(1, (), "", ()); + //~^ error: this function takes 2 arguments but 4 arguments were supplied s(0, 1, ""); // s("") //~^ error: this function takes 1 argument but 3 arguments were supplied } diff --git a/tests/ui/argument-suggestions/issue-109425.stderr b/tests/ui/argument-suggestions/issue-109425.stderr index bfe007793d4..2cd53ed528e 100644 --- a/tests/ui/argument-suggestions/issue-109425.stderr +++ b/tests/ui/argument-suggestions/issue-109425.stderr @@ -74,9 +74,47 @@ LL - is(0, 1, 2, ""); // is(0, "") LL + is(0, ""); // is(0, "") | -error[E0061]: this function takes 1 argument but 3 arguments were supplied +error[E0061]: this function takes 2 arguments but 4 arguments were supplied --> $DIR/issue-109425.rs:18:5 | +LL | is((), 1, "", ()); + | ^^ -- -- unexpected argument #4 of type `()` + | | + | unexpected argument #1 of type `()` + | +note: function defined here + --> $DIR/issue-109425.rs:5:4 + | +LL | fn is(_: u32, _: &str) {} + | ^^ ------ ------- +help: remove the extra arguments + | +LL - is((), 1, "", ()); +LL + is(1, ""); + | + +error[E0061]: this function takes 2 arguments but 4 arguments were supplied + --> $DIR/issue-109425.rs:20:5 + | +LL | is(1, (), "", ()); + | ^^ -- -- unexpected argument #4 of type `()` + | | + | unexpected argument #2 of type `()` + | +note: function defined here + --> $DIR/issue-109425.rs:5:4 + | +LL | fn is(_: u32, _: &str) {} + | ^^ ------ ------- +help: remove the extra arguments + | +LL - is(1, (), "", ()); +LL + is(1, ""); + | + +error[E0061]: this function takes 1 argument but 3 arguments were supplied + --> $DIR/issue-109425.rs:22:5 + | LL | s(0, 1, ""); // s("") | ^ - - unexpected argument #2 of type `{integer}` | | @@ -93,6 +131,6 @@ LL - s(0, 1, ""); // s("") LL + s(""); // s("") | -error: aborting due to 5 previous errors +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0061`. diff --git a/tests/ui/argument-suggestions/issue-112507.stderr b/tests/ui/argument-suggestions/issue-112507.stderr index 908ed35c669..e2ea9af7dc2 100644 --- a/tests/ui/argument-suggestions/issue-112507.stderr +++ b/tests/ui/argument-suggestions/issue-112507.stderr @@ -18,8 +18,9 @@ LL | Float(Option<f64>), | ^^^^^ help: remove the extra arguments | -LL ~ , -LL ~ None); +LL - 0, +LL - None, +LL + None); | error: aborting due to 1 previous error |
