about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr9
-rw-r--r--tests/ui/argument-suggestions/basic.stderr9
-rw-r--r--tests/ui/argument-suggestions/exotic-calls.stderr36
-rw-r--r--tests/ui/argument-suggestions/extra_arguments.stderr145
-rw-r--r--tests/ui/argument-suggestions/issue-101097.stderr6
-rw-r--r--tests/ui/argument-suggestions/issue-97484.stderr11
-rw-r--r--tests/ui/argument-suggestions/mixed_cases.stderr13
-rw-r--r--tests/ui/error-codes/E0057.stderr9
-rw-r--r--tests/ui/issues/issue-16939.stderr9
-rw-r--r--tests/ui/issues/issue-26094.rs2
-rw-r--r--tests/ui/issues/issue-26094.stderr9
-rw-r--r--tests/ui/issues/issue-4935.stderr9
-rw-r--r--tests/ui/methods/method-call-err-msg.stderr9
-rw-r--r--tests/ui/mismatched_types/overloaded-calls-bad.stderr7
-rw-r--r--tests/ui/resolve/resolve-primitive-fallback.stderr9
-rw-r--r--tests/ui/span/issue-34264.stderr18
-rw-r--r--tests/ui/suggestions/args-instead-of-tuple-errors.stderr14
-rw-r--r--tests/ui/tuple/wrong_argument_ice-3.stderr7
-rw-r--r--tests/ui/tuple/wrong_argument_ice-4.stderr9
-rw-r--r--tests/ui/type/type-ascription-instead-of-initializer.stderr9
-rw-r--r--tests/ui/typeck/remove-extra-argument.stderr9
-rw-r--r--tests/ui/typeck/struct-enum-wrong-args.stderr36
22 files changed, 188 insertions, 206 deletions
diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
index 77ea8ef0520..d1b9d7a40b4 100644
--- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
+++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
@@ -7,7 +7,10 @@ LL |   fn oom() -> ! {
    |  _-^^^^^^^^^^^^
 LL | |     loop {}
 LL | | }
-   | |_- argument of type `core::alloc::Layout` unexpected
+   | | -
+   | | |
+   | |_unexpected argument of type `core::alloc::Layout`
+   |   help: remove the extra argument
    |
 note: function defined here
   --> $DIR/alloc-error-handler-bad-signature-3.rs:10:4
@@ -15,10 +18,6 @@ note: function defined here
 LL | fn oom() -> ! {
    |    ^^^
    = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: remove the extra argument
-   |
-LL | fn oom() -> !() {
-   |              ++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/argument-suggestions/basic.stderr b/tests/ui/argument-suggestions/basic.stderr
index 062b3768858..c74186285f9 100644
--- a/tests/ui/argument-suggestions/basic.stderr
+++ b/tests/ui/argument-suggestions/basic.stderr
@@ -16,17 +16,16 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/basic.rs:21:5
    |
 LL |     extra("");
-   |     ^^^^^ -- argument of type `&'static str` unexpected
+   |     ^^^^^ --
+   |           |
+   |           unexpected argument of type `&'static str`
+   |           help: remove the extra argument
    |
 note: function defined here
   --> $DIR/basic.rs:14:4
    |
 LL | fn extra() {}
    |    ^^^^^
-help: remove the extra argument
-   |
-LL |     extra();
-   |          ~~
 
 error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/basic.rs:22:5
diff --git a/tests/ui/argument-suggestions/exotic-calls.stderr b/tests/ui/argument-suggestions/exotic-calls.stderr
index 0580e53c510..ff795b507f2 100644
--- a/tests/ui/argument-suggestions/exotic-calls.stderr
+++ b/tests/ui/argument-suggestions/exotic-calls.stderr
@@ -2,65 +2,61 @@ error[E0057]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/exotic-calls.rs:2:5
    |
 LL |     t(1i32);
-   |     ^ ---- argument of type `i32` unexpected
+   |     ^ ----
+   |       |
+   |       unexpected argument of type `i32`
+   |       help: remove the extra argument
    |
 note: callable defined here
   --> $DIR/exotic-calls.rs:1:11
    |
 LL | fn foo<T: Fn()>(t: T) {
    |           ^^^^
-help: remove the extra argument
-   |
-LL |     t();
-   |      ~~
 
 error[E0057]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/exotic-calls.rs:7:5
    |
 LL |     t(1i32);
-   |     ^ ---- argument of type `i32` unexpected
+   |     ^ ----
+   |       |
+   |       unexpected argument of type `i32`
+   |       help: remove the extra argument
    |
 note: type parameter defined here
   --> $DIR/exotic-calls.rs:6:11
    |
 LL | fn bar(t: impl Fn()) {
    |           ^^^^^^^^^
-help: remove the extra argument
-   |
-LL |     t();
-   |      ~~
 
 error[E0057]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/exotic-calls.rs:16:5
    |
 LL |     baz()(1i32)
-   |     ^^^^^ ---- argument of type `i32` unexpected
+   |     ^^^^^ ----
+   |           |
+   |           unexpected argument of type `i32`
+   |           help: remove the extra argument
    |
 note: opaque type defined here
   --> $DIR/exotic-calls.rs:11:13
    |
 LL | fn baz() -> impl Fn() {
    |             ^^^^^^^^^
-help: remove the extra argument
-   |
-LL |     baz()()
-   |          ~~
 
 error[E0057]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/exotic-calls.rs:22:5
    |
 LL |     x(1i32);
-   |     ^ ---- argument of type `i32` unexpected
+   |     ^ ----
+   |       |
+   |       unexpected argument of type `i32`
+   |       help: remove the extra argument
    |
 note: closure defined here
   --> $DIR/exotic-calls.rs:21:13
    |
 LL |     let x = || {};
    |             ^^
-help: remove the extra argument
-   |
-LL |     x();
-   |      ~~
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/argument-suggestions/extra_arguments.stderr b/tests/ui/argument-suggestions/extra_arguments.stderr
index 48787b0c352..0911685b428 100644
--- a/tests/ui/argument-suggestions/extra_arguments.stderr
+++ b/tests/ui/argument-suggestions/extra_arguments.stderr
@@ -2,57 +2,54 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/extra_arguments.rs:7:3
    |
 LL |   empty("");
-   |   ^^^^^ -- argument of type `&'static str` unexpected
+   |   ^^^^^ --
+   |         |
+   |         unexpected argument of type `&'static str`
+   |         help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:1:4
    |
 LL | fn empty() {}
    |    ^^^^^
-help: remove the extra argument
-   |
-LL |   empty();
-   |        ~~
 
 error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/extra_arguments.rs:9:3
    |
 LL |   one_arg(1, 1);
-   |   ^^^^^^^    - argument of type `{integer}` unexpected
+   |   ^^^^^^^  ---
+   |            | |
+   |            | unexpected argument of type `{integer}`
+   |            help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg(_a: i32) {}
    |    ^^^^^^^ -------
-help: remove the extra argument
-   |
-LL |   one_arg(1);
-   |          ~~~
 
 error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/extra_arguments.rs:10:3
    |
 LL |   one_arg(1, "");
-   |   ^^^^^^^    -- argument of type `&'static str` unexpected
+   |   ^^^^^^^  ----
+   |            | |
+   |            | unexpected argument of type `&'static str`
+   |            help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg(_a: i32) {}
    |    ^^^^^^^ -------
-help: remove the extra argument
-   |
-LL |   one_arg(1);
-   |          ~~~
 
 error[E0061]: this function takes 1 argument but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:11:3
    |
 LL |   one_arg(1, "", 1.0);
-   |   ^^^^^^^    --  --- argument of type `{float}` unexpected
+   |   ^^^^^^^    --  --- unexpected argument of type `{float}`
    |              |
-   |              argument of type `&'static str` unexpected
+   |              unexpected argument of type `&'static str`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:2:4
@@ -61,80 +58,77 @@ LL | fn one_arg(_a: i32) {}
    |    ^^^^^^^ -------
 help: remove the extra arguments
    |
-LL |   one_arg(1);
-   |          ~~~
+LL -   one_arg(1, "", 1.0);
+LL +   one_arg(1);
+   |
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:13:3
    |
 LL |   two_arg_same(1, 1, 1);
-   |   ^^^^^^^^^^^^       - argument of type `{integer}` unexpected
+   |   ^^^^^^^^^^^^     ---
+   |                    | |
+   |                    | unexpected argument of type `{integer}`
+   |                    help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^^^^^ -------  -------
-help: remove the extra argument
-   |
-LL |   two_arg_same(1, 1);
-   |               ~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:14:3
    |
 LL |   two_arg_same(1, 1, 1.0);
-   |   ^^^^^^^^^^^^       --- argument of type `{float}` unexpected
+   |   ^^^^^^^^^^^^     -----
+   |                    | |
+   |                    | unexpected argument of type `{float}`
+   |                    help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^^^^^ -------  -------
-help: remove the extra argument
-   |
-LL |   two_arg_same(1, 1);
-   |               ~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:16:3
    |
 LL |   two_arg_diff(1, 1, "");
-   |   ^^^^^^^^^^^^    - argument of type `{integer}` unexpected
+   |   ^^^^^^^^^^^^  ---
+   |                 | |
+   |                 | unexpected argument of type `{integer}`
+   |                 help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
-help: remove the extra argument
-   |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:17:3
    |
 LL |   two_arg_diff(1, "", "");
-   |   ^^^^^^^^^^^^        -- argument of type `&'static str` unexpected
+   |   ^^^^^^^^^^^^      ----
+   |                     | |
+   |                     | unexpected argument of type `&'static str`
+   |                     help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
-help: remove the extra argument
-   |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 4 arguments were supplied
   --> $DIR/extra_arguments.rs:18:3
    |
 LL |   two_arg_diff(1, 1, "", "");
-   |   ^^^^^^^^^^^^    -      -- argument of type `&'static str` unexpected
+   |   ^^^^^^^^^^^^    -      -- unexpected argument of type `&'static str`
    |                   |
-   |                   argument of type `{integer}` unexpected
+   |                   unexpected argument of type `{integer}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
@@ -143,16 +137,17 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
 help: remove the extra arguments
    |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
+LL -   two_arg_diff(1, 1, "", "");
+LL +   two_arg_diff(1, "");
+   |
 
 error[E0061]: this function takes 2 arguments but 4 arguments were supplied
   --> $DIR/extra_arguments.rs:19:3
    |
 LL |   two_arg_diff(1, "", 1, "");
-   |   ^^^^^^^^^^^^        -  -- argument of type `&'static str` unexpected
+   |   ^^^^^^^^^^^^        -  -- unexpected argument of type `&'static str`
    |                       |
-   |                       argument of type `{integer}` unexpected
+   |                       unexpected argument of type `{integer}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
@@ -161,78 +156,78 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
 help: remove the extra arguments
    |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
+LL -   two_arg_diff(1, "", 1, "");
+LL +   two_arg_diff(1, "");
+   |
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:22:3
    |
 LL |   two_arg_same(1, 1,     "");
-   |   ^^^^^^^^^^^^           -- argument of type `&'static str` unexpected
+   |   ^^^^^^^^^^^^     --------
+   |                    |     |
+   |                    |     unexpected argument of type `&'static str`
+   |                    help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^^^^^ -------  -------
-help: remove the extra argument
-   |
-LL |   two_arg_same(1, 1);
-   |               ~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:23:3
    |
 LL |   two_arg_diff(1, 1,     "");
-   |   ^^^^^^^^^^^^    - argument of type `{integer}` unexpected
+   |   ^^^^^^^^^^^^  ---
+   |                 | |
+   |                 | unexpected argument of type `{integer}`
+   |                 help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
-help: remove the extra argument
-   |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:24:3
    |
-LL |   two_arg_same(
-   |   ^^^^^^^^^^^^
-...
-LL |     ""
-   |     -- argument of type `&'static str` unexpected
+LL |     two_arg_same(
+   |     ^^^^^^^^^^^^
+LL |       1,
+LL |       1,
+   |  ______-
+LL | |     ""
+   | |     --
+   | |_____||
+   |       |help: remove the extra argument
+   |       unexpected argument of type `&'static str`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^^^^^ -------  -------
-help: remove the extra argument
-   |
-LL |   two_arg_same(1, 1);
-   |               ~~~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/extra_arguments.rs:30:3
    |
-LL |   two_arg_diff(
-   |   ^^^^^^^^^^^^
-LL |     1,
-LL |     1,
-   |     - argument of type `{integer}` unexpected
+LL |     two_arg_diff(
+   |     ^^^^^^^^^^^^
+LL |       1,
+   |  ______-
+LL | |     1,
+   | |     -
+   | |     |
+   | |_____unexpected argument of type `{integer}`
+   |       help: remove the extra argument
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
    |    ^^^^^^^^^^^^ -------  --------
-help: remove the extra argument
-   |
-LL |   two_arg_diff(1, "");
-   |               ~~~~~~~
 
 error: aborting due to 14 previous errors
 
diff --git a/tests/ui/argument-suggestions/issue-101097.stderr b/tests/ui/argument-suggestions/issue-101097.stderr
index 7582082ac72..061f510144b 100644
--- a/tests/ui/argument-suggestions/issue-101097.stderr
+++ b/tests/ui/argument-suggestions/issue-101097.stderr
@@ -4,7 +4,7 @@ error[E0061]: this function takes 6 arguments but 7 arguments were supplied
 LL |     f(C, A, A, A, B, B, C);
    |     ^ -     -  -  - expected `C`, found `B`
    |       |     |  |
-   |       |     |  argument of type `A` unexpected
+   |       |     |  unexpected argument of type `A`
    |       |     expected `B`, found `A`
    |       expected `A`, found `C`
    |
@@ -64,8 +64,8 @@ error[E0308]: arguments to this function are incorrect
 LL |     f(A, A, D, D, B, B);
    |     ^       -  -  ---- two arguments of type `C` and `C` are missing
    |             |  |
-   |             |  argument of type `D` unexpected
-   |             argument of type `D` unexpected
+   |             |  unexpected argument of type `D`
+   |             unexpected argument of type `D`
    |
 note: function defined here
   --> $DIR/issue-101097.rs:6:4
diff --git a/tests/ui/argument-suggestions/issue-97484.stderr b/tests/ui/argument-suggestions/issue-97484.stderr
index c2e6e001b17..a86cbbf1802 100644
--- a/tests/ui/argument-suggestions/issue-97484.stderr
+++ b/tests/ui/argument-suggestions/issue-97484.stderr
@@ -2,11 +2,11 @@ error[E0061]: this function takes 4 arguments but 7 arguments were supplied
   --> $DIR/issue-97484.rs:12:5
    |
 LL |     foo(&&A, B, C, D, E, F, G);
-   |     ^^^      -  -     -  - argument of type `F` unexpected
+   |     ^^^      -  -     -  - unexpected argument of type `F`
    |              |  |     |
    |              |  |     expected `&E`, found `E`
-   |              |  argument of type `C` unexpected
-   |              argument of type `B` unexpected
+   |              |  unexpected argument of type `C`
+   |              unexpected argument of type `B`
    |
 note: function defined here
   --> $DIR/issue-97484.rs:9:4
@@ -19,8 +19,9 @@ LL |     foo(&&A, B, C, D, &E, F, G);
    |                       ~~
 help: remove the extra arguments
    |
-LL |     foo(&&A, D, /* &E */, G);
-   |        ~~~~~~~~~~~~~~~~~~~~~
+LL -     foo(&&A, B, C, D, E, F, G);
+LL +     foo(&&A, D, /* &E */, G);
+   |
 
 error: aborting due to previous error
 
diff --git a/tests/ui/argument-suggestions/mixed_cases.stderr b/tests/ui/argument-suggestions/mixed_cases.stderr
index 8cf48060a63..c645dd38179 100644
--- a/tests/ui/argument-suggestions/mixed_cases.stderr
+++ b/tests/ui/argument-suggestions/mixed_cases.stderr
@@ -2,7 +2,7 @@ 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
+   |   ^^^^^^^^    --  ---- unexpected argument of type `X`
    |               |
    |               expected `f32`, found `&str`
    |
@@ -13,16 +13,17 @@ LL | fn two_args(_a: i32, _b: f32) {}
    |    ^^^^^^^^ -------  -------
 help: remove the extra argument
    |
-LL |   two_args(1, /* f32 */);
-   |           ~~~~~~~~~~~~~~
+LL -   two_args(1, "", X {});
+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
+   |   ^^^^^^^^^^    --  ----  -- unexpected argument of type `&'static str`
    |                 |   |
-   |                 |   argument of type `X` unexpected
+   |                 |   unexpected argument of type `X`
    |                 an argument of type `f32` is missing
    |
 note: function defined here
@@ -58,7 +59,7 @@ error[E0308]: arguments to this function are incorrect
   --> $DIR/mixed_cases.rs:17:3
    |
 LL |   three_args(1, "", X {});
-   |   ^^^^^^^^^^    --  ---- argument of type `X` unexpected
+   |   ^^^^^^^^^^    --  ---- unexpected argument of type `X`
    |                 |
    |                 an argument of type `f32` is missing
    |
diff --git a/tests/ui/error-codes/E0057.stderr b/tests/ui/error-codes/E0057.stderr
index 163737895fe..9b0cf069824 100644
--- a/tests/ui/error-codes/E0057.stderr
+++ b/tests/ui/error-codes/E0057.stderr
@@ -18,17 +18,16 @@ error[E0057]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/E0057.rs:5:13
    |
 LL |     let c = f(2, 3);
-   |             ^    - argument of type `{integer}` unexpected
+   |             ^  ---
+   |                | |
+   |                | unexpected argument of type `{integer}`
+   |                help: remove the extra argument
    |
 note: closure defined here
   --> $DIR/E0057.rs:2:13
    |
 LL |     let f = |x| x * 3;
    |             ^^^
-help: remove the extra argument
-   |
-LL |     let c = f(2);
-   |              ~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-16939.stderr b/tests/ui/issues/issue-16939.stderr
index 76645645464..6db29bc61b1 100644
--- a/tests/ui/issues/issue-16939.stderr
+++ b/tests/ui/issues/issue-16939.stderr
@@ -2,17 +2,16 @@ error[E0057]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/issue-16939.rs:5:9
    |
 LL |     |t| f(t);
-   |         ^ - argument unexpected
+   |         ^ -
+   |           |
+   |           unexpected argument
+   |           help: remove the extra argument
    |
 note: callable defined here
   --> $DIR/issue-16939.rs:4:12
    |
 LL | fn _foo<F: Fn()> (f: F) {
    |            ^^^^
-help: remove the extra argument
-   |
-LL |     |t| f();
-   |          ~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-26094.rs b/tests/ui/issues/issue-26094.rs
index d3d670aa92a..abf3543ddb9 100644
--- a/tests/ui/issues/issue-26094.rs
+++ b/tests/ui/issues/issue-26094.rs
@@ -1,6 +1,6 @@
 macro_rules! some_macro {
     ($other: expr) => ({
-        $other(None) //~ NOTE argument of type `Option<_>` unexpected
+        $other(None) //~ NOTE unexpected argument of type `Option<_>`
     })
 }
 
diff --git a/tests/ui/issues/issue-26094.stderr b/tests/ui/issues/issue-26094.stderr
index 881a6e538ee..608d2c7aff9 100644
--- a/tests/ui/issues/issue-26094.stderr
+++ b/tests/ui/issues/issue-26094.stderr
@@ -2,7 +2,10 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/issue-26094.rs:10:17
    |
 LL |         $other(None)
-   |                ---- argument of type `Option<_>` unexpected
+   |                ----
+   |                |
+   |                unexpected argument of type `Option<_>`
+   |                help: remove the extra argument
 ...
 LL |     some_macro!(some_function);
    |                 ^^^^^^^^^^^^^
@@ -12,10 +15,6 @@ note: function defined here
    |
 LL | fn some_function() {}
    |    ^^^^^^^^^^^^^
-help: remove the extra argument
-   |
-LL |         some_function()
-   |         ~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-4935.stderr b/tests/ui/issues/issue-4935.stderr
index bb45fa08338..e544e424403 100644
--- a/tests/ui/issues/issue-4935.stderr
+++ b/tests/ui/issues/issue-4935.stderr
@@ -2,17 +2,16 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/issue-4935.rs:5:13
    |
 LL | fn main() { foo(5, 6) }
-   |             ^^^    - argument of type `{integer}` unexpected
+   |             ^^^  ---
+   |                  | |
+   |                  | unexpected argument of type `{integer}`
+   |                  help: remove the extra argument
    |
 note: function defined here
   --> $DIR/issue-4935.rs:3:4
    |
 LL | fn foo(a: usize) {}
    |    ^^^ --------
-help: remove the extra argument
-   |
-LL | fn main() { foo(5) }
-   |                ~~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/methods/method-call-err-msg.stderr b/tests/ui/methods/method-call-err-msg.stderr
index 81269b73b9a..0f37e8f09a9 100644
--- a/tests/ui/methods/method-call-err-msg.stderr
+++ b/tests/ui/methods/method-call-err-msg.stderr
@@ -2,17 +2,16 @@ error[E0061]: this method takes 0 arguments but 1 argument was supplied
   --> $DIR/method-call-err-msg.rs:13:7
    |
 LL |     x.zero(0)
-   |       ^^^^ - argument of type `{integer}` unexpected
+   |       ^^^^ -
+   |            |
+   |            unexpected argument of type `{integer}`
+   |            help: remove the extra argument
    |
 note: associated function defined here
   --> $DIR/method-call-err-msg.rs:5:8
    |
 LL |     fn zero(self) -> Foo { self }
    |        ^^^^
-help: remove the extra argument
-   |
-LL |     x.zero()
-   |           ~~
 
 error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> $DIR/method-call-err-msg.rs:14:7
diff --git a/tests/ui/mismatched_types/overloaded-calls-bad.stderr b/tests/ui/mismatched_types/overloaded-calls-bad.stderr
index 3a895acbdb5..cd483e7ad2c 100644
--- a/tests/ui/mismatched_types/overloaded-calls-bad.stderr
+++ b/tests/ui/mismatched_types/overloaded-calls-bad.stderr
@@ -32,7 +32,7 @@ error[E0057]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/overloaded-calls-bad.rs:37:15
    |
 LL |     let ans = s("burma", "shave");
-   |               ^ -------  ------- argument of type `&'static str` unexpected
+   |               ^ -------  ------- unexpected argument of type `&'static str`
    |                 |
    |                 expected `isize`, found `&str`
    |
@@ -43,8 +43,9 @@ LL | impl FnMut<(isize,)> for S {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: remove the extra argument
    |
-LL |     let ans = s(/* isize */);
-   |                ~~~~~~~~~~~~~
+LL -     let ans = s("burma", "shave");
+LL +     let ans = s(/* isize */);
+   |
 
 error[E0308]: mismatched types
   --> $DIR/overloaded-calls-bad.rs:40:7
diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr
index 964302e924c..f803f9da2af 100644
--- a/tests/ui/resolve/resolve-primitive-fallback.stderr
+++ b/tests/ui/resolve/resolve-primitive-fallback.stderr
@@ -24,14 +24,13 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/resolve-primitive-fallback.rs:3:5
    |
 LL |     std::mem::size_of(u16);
-   |     ^^^^^^^^^^^^^^^^^ --- argument unexpected
+   |     ^^^^^^^^^^^^^^^^^ ---
+   |                       |
+   |                       unexpected argument
+   |                       help: remove the extra argument
    |
 note: function defined here
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-help: remove the extra argument
-   |
-LL |     std::mem::size_of();
-   |                      ~~
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/span/issue-34264.stderr b/tests/ui/span/issue-34264.stderr
index 15179954adc..f0dea66f612 100644
--- a/tests/ui/span/issue-34264.stderr
+++ b/tests/ui/span/issue-34264.stderr
@@ -54,17 +54,16 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/issue-34264.rs:7:5
    |
 LL |     foo(Some(42), 2, "");
-   |     ^^^              -- argument of type `&'static str` unexpected
+   |     ^^^            ----
+   |                    | |
+   |                    | unexpected argument of type `&'static str`
+   |                    help: remove the extra argument
    |
 note: function defined here
   --> $DIR/issue-34264.rs:1:4
    |
 LL | fn foo(Option<i32>, String) {}
    |    ^^^ -----------  ------
-help: remove the extra argument
-   |
-LL |     foo(Some(42), 2);
-   |        ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-34264.rs:8:13
@@ -84,17 +83,16 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/issue-34264.rs:10:5
    |
 LL |     bar(1, 2, 3);
-   |     ^^^       - argument of type `{integer}` unexpected
+   |     ^^^     ---
+   |             | |
+   |             | unexpected argument of type `{integer}`
+   |             help: remove the extra argument
    |
 note: function defined here
   --> $DIR/issue-34264.rs:3:4
    |
 LL | fn bar(x, y: usize) {}
    |    ^^^ -  --------
-help: remove the extra argument
-   |
-LL |     bar(1, 2);
-   |        ~~~~~~
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/suggestions/args-instead-of-tuple-errors.stderr b/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
index e9736363816..510b99bb5af 100644
--- a/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
+++ b/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
@@ -2,7 +2,7 @@ error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
   --> $DIR/args-instead-of-tuple-errors.rs:6:34
    |
 LL |     let _: Option<(i32, bool)> = Some(1, 2);
-   |                                  ^^^^    - argument of type `{integer}` unexpected
+   |                                  ^^^^    - unexpected argument of type `{integer}`
    |
 note: expected `(i32, bool)`, found integer
   --> $DIR/args-instead-of-tuple-errors.rs:6:39
@@ -22,14 +22,15 @@ note: tuple variant defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
 help: remove the extra argument
    |
-LL |     let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
-   |                                      ~~~~~~~~~~~~~~~~~~~
+LL -     let _: Option<(i32, bool)> = Some(1, 2);
+LL +     let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
+   |
 
 error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/args-instead-of-tuple-errors.rs:8:5
    |
 LL |     int_bool(1, 2);
-   |     ^^^^^^^^    - argument of type `{integer}` unexpected
+   |     ^^^^^^^^    - unexpected argument of type `{integer}`
    |
 note: expected `(i32, bool)`, found integer
   --> $DIR/args-instead-of-tuple-errors.rs:8:14
@@ -45,8 +46,9 @@ LL | fn int_bool(_: (i32, bool)) {
    |    ^^^^^^^^ --------------
 help: remove the extra argument
    |
-LL |     int_bool(/* (i32, bool) */);
-   |             ~~~~~~~~~~~~~~~~~~~
+LL -     int_bool(1, 2);
+LL +     int_bool(/* (i32, bool) */);
+   |
 
 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
   --> $DIR/args-instead-of-tuple-errors.rs:11:28
diff --git a/tests/ui/tuple/wrong_argument_ice-3.stderr b/tests/ui/tuple/wrong_argument_ice-3.stderr
index 75dfe716395..7143c959478 100644
--- a/tests/ui/tuple/wrong_argument_ice-3.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-3.stderr
@@ -2,7 +2,7 @@ error[E0061]: this method takes 1 argument but 2 arguments were supplied
   --> $DIR/wrong_argument_ice-3.rs:9:16
    |
 LL |         groups.push(new_group, vec![process]);
-   |                ^^^^            ------------- argument of type `Vec<&Process>` unexpected
+   |                ^^^^            ------------- unexpected argument of type `Vec<&Process>`
    |
 note: expected `(Vec<String>, Vec<Process>)`, found `Vec<String>`
   --> $DIR/wrong_argument_ice-3.rs:9:21
@@ -15,8 +15,9 @@ note: associated function defined here
   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 help: remove the extra argument
    |
-LL |         groups.push(/* (Vec<String>, Vec<Process>) */);
-   |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -         groups.push(new_group, vec![process]);
+LL +         groups.push(/* (Vec<String>, Vec<Process>) */);
+   |
 
 error: aborting due to previous error
 
diff --git a/tests/ui/tuple/wrong_argument_ice-4.stderr b/tests/ui/tuple/wrong_argument_ice-4.stderr
index a2686ab9440..d8569ebf6b6 100644
--- a/tests/ui/tuple/wrong_argument_ice-4.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-4.stderr
@@ -6,17 +6,16 @@ LL |       (|| {})(|| {
 LL | |
 LL | |         let b = 1;
 LL | |     });
-   | |_____- argument of type `[closure@$DIR/wrong_argument_ice-4.rs:2:13: 2:15]` unexpected
+   | |     -
+   | |     |
+   | |_____unexpected argument of type `[closure@$DIR/wrong_argument_ice-4.rs:2:13: 2:15]`
+   |       help: remove the extra argument
    |
 note: closure defined here
   --> $DIR/wrong_argument_ice-4.rs:2:6
    |
 LL |     (|| {})(|| {
    |      ^^
-help: remove the extra argument
-   |
-LL |     (|| {})();
-   |            ~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type/type-ascription-instead-of-initializer.stderr b/tests/ui/type/type-ascription-instead-of-initializer.stderr
index ba8d15d0b73..429501c2762 100644
--- a/tests/ui/type/type-ascription-instead-of-initializer.stderr
+++ b/tests/ui/type/type-ascription-instead-of-initializer.stderr
@@ -11,14 +11,13 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/type-ascription-instead-of-initializer.rs:2:12
    |
 LL |     let x: Vec::with_capacity(10, 20);
-   |            ^^^^^^^^^^^^^^^^^^     -- argument of type `{integer}` unexpected
+   |            ^^^^^^^^^^^^^^^^^^   ----
+   |                                 | |
+   |                                 | unexpected argument of type `{integer}`
+   |                                 help: remove the extra argument
    |
 note: associated function defined here
   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-help: remove the extra argument
-   |
-LL |     let x: Vec::with_capacity(10);
-   |                              ~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/typeck/remove-extra-argument.stderr b/tests/ui/typeck/remove-extra-argument.stderr
index b734bcd4eb0..72ddebab486 100644
--- a/tests/ui/typeck/remove-extra-argument.stderr
+++ b/tests/ui/typeck/remove-extra-argument.stderr
@@ -2,17 +2,16 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/remove-extra-argument.rs:6:5
    |
 LL |     l(vec![], vec![])
-   |     ^         ------ argument of type `Vec<_>` unexpected
+   |     ^       --------
+   |             | |
+   |             | unexpected argument of type `Vec<_>`
+   |             help: remove the extra argument
    |
 note: function defined here
   --> $DIR/remove-extra-argument.rs:3:4
    |
 LL | fn l(_a: Vec<u8>) {}
    |    ^ -----------
-help: remove the extra argument
-   |
-LL |     l(vec![])
-   |      ~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/typeck/struct-enum-wrong-args.stderr b/tests/ui/typeck/struct-enum-wrong-args.stderr
index fbced928a8a..57cbd1d2005 100644
--- a/tests/ui/typeck/struct-enum-wrong-args.stderr
+++ b/tests/ui/typeck/struct-enum-wrong-args.stderr
@@ -2,29 +2,29 @@ error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:6:13
    |
 LL |     let _ = Some(3, 2);
-   |             ^^^^    - argument of type `{integer}` unexpected
+   |             ^^^^  ---
+   |                   | |
+   |                   | unexpected argument of type `{integer}`
+   |                   help: remove the extra argument
    |
 note: tuple variant defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
-help: remove the extra argument
-   |
-LL |     let _ = Some(3);
-   |                 ~~~
 
 error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:7:13
    |
 LL |     let _ = Ok(3, 6, 2);
-   |             ^^    -  - argument of type `{integer}` unexpected
+   |             ^^    -  - unexpected argument of type `{integer}`
    |                   |
-   |                   argument of type `{integer}` unexpected
+   |                   unexpected argument of type `{integer}`
    |
 note: tuple variant defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
 help: remove the extra arguments
    |
-LL |     let _ = Ok(3);
-   |               ~~~
+LL -     let _ = Ok(3, 6, 2);
+LL +     let _ = Ok(3);
+   |
 
 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:8:13
@@ -59,17 +59,16 @@ error[E0061]: this struct takes 1 argument but 2 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:10:13
    |
 LL |     let _ = Wrapper(5, 2);
-   |             ^^^^^^^    - argument of type `{integer}` unexpected
+   |             ^^^^^^^  ---
+   |                      | |
+   |                      | unexpected argument of type `{integer}`
+   |                      help: remove the extra argument
    |
 note: tuple struct defined here
   --> $DIR/struct-enum-wrong-args.rs:2:8
    |
 LL | struct Wrapper(i32);
    |        ^^^^^^^
-help: remove the extra argument
-   |
-LL |     let _ = Wrapper(5);
-   |                    ~~~
 
 error[E0061]: this struct takes 2 arguments but 0 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:11:13
@@ -107,17 +106,16 @@ error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:13:13
    |
 LL |     let _ = DoubleWrapper(5, 2, 7);
-   |             ^^^^^^^^^^^^^       - argument of type `{integer}` unexpected
+   |             ^^^^^^^^^^^^^     ---
+   |                               | |
+   |                               | unexpected argument of type `{integer}`
+   |                               help: remove the extra argument
    |
 note: tuple struct defined here
   --> $DIR/struct-enum-wrong-args.rs:3:8
    |
 LL | struct DoubleWrapper(i32, i32);
    |        ^^^^^^^^^^^^^
-help: remove the extra argument
-   |
-LL |     let _ = DoubleWrapper(5, 2);
-   |                          ~~~~~~
 
 error: aborting due to 8 previous errors