Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
long-long-float committed Jul 13, 2024
1 parent 413e25b commit c84a3a6
Show file tree
Hide file tree
Showing 47 changed files with 134 additions and 244 deletions.
4 changes: 2 additions & 2 deletions tests/ui/argument-suggestions/basic.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/basic.rs:22:5
|
LL | missing();
| ^^^^^^^-- an argument of type `u32` is missing
| ^^^^^^^-- argument #1 of type `u32` is missing
|
note: function defined here
--> $DIR/basic.rs:15:4
Expand Down Expand Up @@ -86,7 +86,7 @@ error[E0057]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/basic.rs:27:5
|
LL | closure();
| ^^^^^^^-- an argument is missing
| ^^^^^^^-- argument #1 is missing
|
note: closure defined here
--> $DIR/basic.rs:26:19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/display-is-suggestable.rs:6:5
|
LL | foo();
| ^^^-- an argument of type `&dyn std::fmt::Display + Send` is missing
| ^^^-- argument #1 of type `&dyn std::fmt::Display + Send` is missing
|
note: function defined here
--> $DIR/display-is-suggestable.rs:3:4
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/argument-suggestions/extern-fn-arg-names.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> $DIR/extern-fn-arg-names.rs:7:5
|
LL | dstfn(1);
| ^^^^^--- #2 argument is missing
| ^^^^^--- argument #2 is missing
|
note: function defined here
--> $DIR/extern-fn-arg-names.rs:2:8
Expand Down
165 changes: 28 additions & 137 deletions tests/ui/argument-suggestions/extra_arguments.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:20:3
|
LL | empty(1, 1);
| ^^^^^ - - unexpected #2 argument of type `{integer}`
| ^^^^^ - - unexpected argument #2 of type `{integer}`
| |
| unexpected #1 argument of type `{integer}`
| unexpected argument #1 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
Expand All @@ -38,14 +38,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:22:3
|
LL | one_arg(1, 1);
<<<<<<< HEAD
| ^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -62,14 +55,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:23:3
|
LL | one_arg(1, "");
<<<<<<< HEAD
| ^^^^^^^ -- unexpected argument of type `&'static str`
=======
| ^^^^^^^ ----
| | |
| | unexpected #2 argument of type `&'static str`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ -- unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -86,9 +72,9 @@ error[E0061]: this function takes 1 argument but 3 arguments were supplied
--> $DIR/extra_arguments.rs:24:3
|
LL | one_arg(1, "", 1.0);
| ^^^^^^^ -- --- unexpected #3 argument of type `{float}`
| ^^^^^^^ -- --- unexpected argument #3 of type `{float}`
| |
| unexpected #2 argument of type `&'static str`
| unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -105,14 +91,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:26:3
|
LL | two_arg_same(1, 1, 1);
<<<<<<< HEAD
| ^^^^^^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^^^^^^ ---
| | |
| | unexpected #3 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ - unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
Expand All @@ -129,14 +108,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:27:3
|
LL | two_arg_same(1, 1, 1.0);
<<<<<<< HEAD
| ^^^^^^^^^^^^ --- unexpected argument of type `{float}`
=======
| ^^^^^^^^^^^^ -----
| | |
| | unexpected #3 argument of type `{float}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ --- unexpected argument #3 of type `{float}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
Expand All @@ -153,14 +125,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:29:3
|
LL | two_arg_diff(1, 1, "");
<<<<<<< HEAD
| ^^^^^^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -177,14 +142,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:30:3
|
LL | two_arg_diff(1, "", "");
<<<<<<< HEAD
| ^^^^^^^^^^^^ -- unexpected argument of type `&'static str`
=======
| ^^^^^^^^^^^^ ----
| | |
| | unexpected #3 argument of type `&'static str`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -201,9 +159,9 @@ error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:31:3
|
LL | two_arg_diff(1, 1, "", "");
| ^^^^^^^^^^^^ - -- unexpected #4 argument of type `&'static str`
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
| |
| unexpected #2 argument of type `{integer}`
| unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -220,9 +178,9 @@ error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:32:3
|
LL | two_arg_diff(1, "", 1, "");
| ^^^^^^^^^^^^ - -- unexpected #4 argument of type `&'static str`
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
| |
| unexpected #3 argument of type `{integer}`
| unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -239,14 +197,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:35:3
|
LL | two_arg_same(1, 1, "");
<<<<<<< HEAD
| ^^^^^^^^^^^^ -- unexpected argument of type `&'static str`
=======
| ^^^^^^^^^^^^ --------
| | |
| | unexpected #3 argument of type `&'static str`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
Expand All @@ -263,14 +214,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:36:3
|
LL | two_arg_diff(1, 1, "");
<<<<<<< HEAD
| ^^^^^^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -286,24 +230,11 @@ LL + two_arg_diff(1, "");
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:37:3
|
<<<<<<< HEAD
LL | two_arg_same(
| ^^^^^^^^^^^^
...
LL | ""
| -- unexpected argument of type `&'static str`
=======
LL | two_arg_same(
| ^^^^^^^^^^^^
LL | 1,
LL | 1,
| ______-
LL | | ""
| | --
| |_____||
| |help: remove the extra argument
| unexpected #3 argument of type `&'static str`
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
Expand All @@ -320,23 +251,11 @@ LL + 1
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:43:3
|
<<<<<<< HEAD
LL | two_arg_diff(
| ^^^^^^^^^^^^
LL | 1,
LL | 1,
| - unexpected argument of type `{integer}`
=======
LL | two_arg_diff(
| ^^^^^^^^^^^^
LL | 1,
| ______-
LL | | 1,
| | -
| | |
| |_____unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
Expand All @@ -352,12 +271,12 @@ error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:8:9
|
LL | empty($x, 1);
| ^^^^^ - unexpected #2 argument of type `{integer}`
| ^^^^^ - unexpected argument #2 of type `{integer}`
...
LL | foo!(1, ~);
| ----------
| | |
| | unexpected #1 argument of type `{integer}`
| | unexpected argument #1 of type `{integer}`
| in this macro invocation
|
note: function defined here
Expand All @@ -371,12 +290,12 @@ error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:14:9
|
LL | empty(1, $y);
| ^^^^^ - unexpected #1 argument of type `{integer}`
| ^^^^^ - unexpected argument #1 of type `{integer}`
...
LL | foo!(~, 1);
| ----------
| | |
| | unexpected #2 argument of type `{integer}`
| | unexpected argument #2 of type `{integer}`
| in this macro invocation
|
note: function defined here
Expand All @@ -395,8 +314,8 @@ LL | empty($x, $y);
LL | foo!(1, 1);
| ----------
| | | |
| | | unexpected #2 argument of type `{integer}`
| | unexpected #1 argument of type `{integer}`
| | | unexpected argument #2 of type `{integer}`
| | unexpected argument #1 of type `{integer}`
| in this macro invocation
|
note: function defined here
Expand All @@ -410,14 +329,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:53:3
|
LL | one_arg(1, panic!());
<<<<<<< HEAD
| ^^^^^^^ -------- unexpected argument
=======
| ^^^^^^^ ----------
| | |
| | unexpected #2 argument
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ -------- unexpected argument #2
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -434,14 +346,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:54:3
|
LL | one_arg(panic!(), 1);
<<<<<<< HEAD
| ^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -458,14 +363,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:55:3
|
LL | one_arg(stringify!($e), 1);
<<<<<<< HEAD
| ^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand All @@ -482,14 +380,7 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:60:3
|
LL | one_arg(for _ in 1.. {}, 1);
<<<<<<< HEAD
| ^^^^^^^ - unexpected argument of type `{integer}`
=======
| ^^^^^^^ ---
| | |
| | unexpected #2 argument of type `{integer}`
| help: remove the extra argument
>>>>>>> c71324b4859 (Use ordinal number in argument error)
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/argument-suggestions/issue-100478.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ error[E0061]: this function takes 3 arguments but 1 argument was supplied
LL | three_diff(T2::new(0));
| ^^^^^^^^^^------------
| ||
| |#1 argument of type `T1` is missing
| #3 argument of type `T3` is missing
| |argument #1 of type `T1` is missing
| argument #3 of type `T3` is missing
|
note: function defined here
--> $DIR/issue-100478.rs:30:4
Expand Down Expand Up @@ -63,7 +63,7 @@ LL | foo(
| ^^^
...
LL | p3, p4, p5, p6, p7, p8,
| -- #2 argument of type `Arc<T2>` is missing
| -- argument #2 of type `Arc<T2>` is missing
|
note: function defined here
--> $DIR/issue-100478.rs:29:4
Expand Down
Loading

0 comments on commit c84a3a6

Please sign in to comment.