about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-02-01 17:38:56 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-02-14 20:22:10 +0000
commit5d63e10318ea76efc4d4d6a33cf1f74c9839adfb (patch)
tree7bac8c472be48675a1b63380f9cb31c43c246c24
parent287cd5974c3fc7c885500036ffc8305ac978bede (diff)
downloadrust-5d63e10318ea76efc4d4d6a33cf1f74c9839adfb.tar.gz
rust-5d63e10318ea76efc4d4d6a33cf1f74c9839adfb.zip
rebase and review comments
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs3
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs2
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr2
-rw-r--r--tests/ui/argument-suggestions/basic.stderr2
-rw-r--r--tests/ui/argument-suggestions/exotic-calls.stderr8
-rw-r--r--tests/ui/argument-suggestions/extra_arguments.stderr34
-rw-r--r--tests/ui/argument-suggestions/issue-101097.stderr6
-rw-r--r--tests/ui/argument-suggestions/issue-97484.stderr6
-rw-r--r--tests/ui/argument-suggestions/mixed_cases.stderr8
-rw-r--r--tests/ui/error-codes/E0057.stderr2
-rw-r--r--tests/ui/issues/issue-16939.stderr2
-rw-r--r--tests/ui/issues/issue-26094.rs2
-rw-r--r--tests/ui/issues/issue-26094.stderr2
-rw-r--r--tests/ui/issues/issue-4935.stderr2
-rw-r--r--tests/ui/methods/method-call-err-msg.stderr2
-rw-r--r--tests/ui/mismatched_types/overloaded-calls-bad.stderr2
-rw-r--r--tests/ui/resolve/resolve-primitive-fallback.stderr2
-rw-r--r--tests/ui/span/issue-34264.stderr4
-rw-r--r--tests/ui/suggestions/args-instead-of-tuple-errors.stderr4
-rw-r--r--tests/ui/tuple/wrong_argument_ice-3.stderr2
-rw-r--r--tests/ui/tuple/wrong_argument_ice-4.stderr2
-rw-r--r--tests/ui/type/type-ascription-instead-of-initializer.stderr2
-rw-r--r--tests/ui/typeck/remove-extra-argument.stderr2
-rw-r--r--tests/ui/typeck/struct-enum-wrong-args.stderr10
24 files changed, 56 insertions, 57 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 5b2786fbb17..9ed8ab67431 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -612,7 +612,7 @@ impl Diagnostic {
     pub fn multipart_suggestion_with_style(
         &mut self,
         msg: impl Into<SubdiagnosticMessage>,
-        mut suggestion: Vec<(Span, String)>,
+        suggestion: Vec<(Span, String)>,
         applicability: Applicability,
         style: SuggestionStyle,
     ) -> &mut Self {
@@ -634,7 +634,6 @@ impl Diagnostic {
             None,
             "suggestion must not have overlapping parts",
         );
-        suggestion.sort_by_key(|(span, _)| (span.lo(), span.hi()));
 
         self.push_suggestion(CodeSuggestion {
             substitutions: vec![Substitution { parts }],
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
index af57d1e5120..21f236db7dc 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
@@ -930,7 +930,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         "".to_string()
                     };
                     labels
-                        .push((provided_span, format!("argument{} unexpected", provided_ty_name)));
+                        .push((provided_span, format!("unexpected argument{}", provided_ty_name)));
                     let mut span = provided_span;
                     if arg_idx.index() > 0
                         && let Some((_, prev)) = provided_arg_tys
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 147e7e246af..9f568f86970 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,7 @@ LL |   fn oom() -> ! {
    |  _-^^^^^^^^^^^^
 LL | |     loop {}
 LL | | }
-   | |_- argument of type `core::alloc::Layout` unexpected
+   | |_- unexpected argument of type `core::alloc::Layout`
    |
 note: function defined here
   --> $DIR/alloc-error-handler-bad-signature-3.rs:10:4
diff --git a/tests/ui/argument-suggestions/basic.stderr b/tests/ui/argument-suggestions/basic.stderr
index 5333483e2e9..ea58ca97cfa 100644
--- a/tests/ui/argument-suggestions/basic.stderr
+++ b/tests/ui/argument-suggestions/basic.stderr
@@ -16,7 +16,7 @@ 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`
    |
 note: function defined here
   --> $DIR/basic.rs:14:4
diff --git a/tests/ui/argument-suggestions/exotic-calls.stderr b/tests/ui/argument-suggestions/exotic-calls.stderr
index f46894ba4c7..aca3b8a3433 100644
--- a/tests/ui/argument-suggestions/exotic-calls.stderr
+++ b/tests/ui/argument-suggestions/exotic-calls.stderr
@@ -2,7 +2,7 @@ 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`
    |
 note: callable defined here
   --> $DIR/exotic-calls.rs:1:11
@@ -19,7 +19,7 @@ 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`
    |
 note: type parameter defined here
   --> $DIR/exotic-calls.rs:6:11
@@ -36,7 +36,7 @@ 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`
    |
 note: opaque type defined here
   --> $DIR/exotic-calls.rs:11:13
@@ -53,7 +53,7 @@ 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`
    |
 note: closure defined here
   --> $DIR/exotic-calls.rs:21:13
diff --git a/tests/ui/argument-suggestions/extra_arguments.stderr b/tests/ui/argument-suggestions/extra_arguments.stderr
index 2818dbe9341..34e849e85cc 100644
--- a/tests/ui/argument-suggestions/extra_arguments.stderr
+++ b/tests/ui/argument-suggestions/extra_arguments.stderr
@@ -2,7 +2,7 @@ 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`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:1:4
@@ -19,7 +19,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:2:4
@@ -36,7 +36,7 @@ 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`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:2:4
@@ -53,9 +53,9 @@ 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
@@ -72,7 +72,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
@@ -89,7 +89,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
@@ -106,7 +106,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
@@ -123,7 +123,7 @@ 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`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
@@ -140,9 +140,9 @@ 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
@@ -159,9 +159,9 @@ 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
@@ -178,7 +178,7 @@ 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`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
@@ -195,7 +195,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
@@ -215,7 +215,7 @@ LL |   two_arg_same(
    |   ^^^^^^^^^^^^
 ...
 LL |     ""
-   |     -- argument of type `&'static str` unexpected
+   |     -- unexpected argument of type `&'static str`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:3:4
@@ -235,7 +235,7 @@ LL |   two_arg_diff(
    |   ^^^^^^^^^^^^
 LL |     1,
 LL |     1,
-   |     - argument of type `{integer}` unexpected
+   |     - unexpected argument of type `{integer}`
    |
 note: function defined here
   --> $DIR/extra_arguments.rs:4:4
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 95795a50fce..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
diff --git a/tests/ui/argument-suggestions/mixed_cases.stderr b/tests/ui/argument-suggestions/mixed_cases.stderr
index 39eae28b8ca..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`
    |
@@ -21,9 +21,9 @@ 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
@@ -59,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 fc973cd5ef5..efd2af6d609 100644
--- a/tests/ui/error-codes/E0057.stderr
+++ b/tests/ui/error-codes/E0057.stderr
@@ -18,7 +18,7 @@ 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}`
    |
 note: closure defined here
   --> $DIR/E0057.rs:2:13
diff --git a/tests/ui/issues/issue-16939.stderr b/tests/ui/issues/issue-16939.stderr
index 92e35b47fc8..50c502c527e 100644
--- a/tests/ui/issues/issue-16939.stderr
+++ b/tests/ui/issues/issue-16939.stderr
@@ -2,7 +2,7 @@ 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
    |
 note: callable defined here
   --> $DIR/issue-16939.rs:4:12
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 31bcea83e14..074cf31dda6 100644
--- a/tests/ui/issues/issue-26094.stderr
+++ b/tests/ui/issues/issue-26094.stderr
@@ -2,7 +2,7 @@ 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<_>`
 ...
 LL |     some_macro!(some_function);
    |                 ^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-4935.stderr b/tests/ui/issues/issue-4935.stderr
index 8b4eeac731b..2853fd9b7fb 100644
--- a/tests/ui/issues/issue-4935.stderr
+++ b/tests/ui/issues/issue-4935.stderr
@@ -2,7 +2,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/issue-4935.rs:3:4
diff --git a/tests/ui/methods/method-call-err-msg.stderr b/tests/ui/methods/method-call-err-msg.stderr
index 4b312ce28a4..e33efac938a 100644
--- a/tests/ui/methods/method-call-err-msg.stderr
+++ b/tests/ui/methods/method-call-err-msg.stderr
@@ -2,7 +2,7 @@ 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}`
    |
 note: associated function defined here
   --> $DIR/method-call-err-msg.rs:5:8
diff --git a/tests/ui/mismatched_types/overloaded-calls-bad.stderr b/tests/ui/mismatched_types/overloaded-calls-bad.stderr
index 2fa0bd1e096..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`
    |
diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr
index f46b1073d84..0477faad46f 100644
--- a/tests/ui/resolve/resolve-primitive-fallback.stderr
+++ b/tests/ui/resolve/resolve-primitive-fallback.stderr
@@ -24,7 +24,7 @@ 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
    |
 note: function defined here
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
diff --git a/tests/ui/span/issue-34264.stderr b/tests/ui/span/issue-34264.stderr
index 8a27b2dabf1..89c67719b5a 100644
--- a/tests/ui/span/issue-34264.stderr
+++ b/tests/ui/span/issue-34264.stderr
@@ -54,7 +54,7 @@ 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`
    |
 note: function defined here
   --> $DIR/issue-34264.rs:1:4
@@ -85,7 +85,7 @@ 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}`
    |
 note: function defined here
   --> $DIR/issue-34264.rs:3:4
diff --git a/tests/ui/suggestions/args-instead-of-tuple-errors.stderr b/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
index e592f3156cb..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
@@ -30,7 +30,7 @@ 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
diff --git a/tests/ui/tuple/wrong_argument_ice-3.stderr b/tests/ui/tuple/wrong_argument_ice-3.stderr
index d8ab265cfc9..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
diff --git a/tests/ui/tuple/wrong_argument_ice-4.stderr b/tests/ui/tuple/wrong_argument_ice-4.stderr
index 1ff4c3d49ed..f2e3b416545 100644
--- a/tests/ui/tuple/wrong_argument_ice-4.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-4.stderr
@@ -6,7 +6,7 @@ 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]`
    |
 note: closure defined here
   --> $DIR/wrong_argument_ice-4.rs:2:6
diff --git a/tests/ui/type/type-ascription-instead-of-initializer.stderr b/tests/ui/type/type-ascription-instead-of-initializer.stderr
index b73d7cd144e..6c5447a62ea 100644
--- a/tests/ui/type/type-ascription-instead-of-initializer.stderr
+++ b/tests/ui/type/type-ascription-instead-of-initializer.stderr
@@ -11,7 +11,7 @@ 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}`
    |
 note: associated function defined here
   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
diff --git a/tests/ui/typeck/remove-extra-argument.stderr b/tests/ui/typeck/remove-extra-argument.stderr
index c9d5c6b9fb2..32a4d0ac722 100644
--- a/tests/ui/typeck/remove-extra-argument.stderr
+++ b/tests/ui/typeck/remove-extra-argument.stderr
@@ -2,7 +2,7 @@ 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<_>`
    |
 note: function defined here
   --> $DIR/remove-extra-argument.rs:3:4
diff --git a/tests/ui/typeck/struct-enum-wrong-args.stderr b/tests/ui/typeck/struct-enum-wrong-args.stderr
index 49ff3540027..d005eca841e 100644
--- a/tests/ui/typeck/struct-enum-wrong-args.stderr
+++ b/tests/ui/typeck/struct-enum-wrong-args.stderr
@@ -2,7 +2,7 @@ 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}`
    |
 note: tuple variant defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
@@ -16,9 +16,9 @@ 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
@@ -61,7 +61,7 @@ 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}`
    |
 note: tuple struct defined here
   --> $DIR/struct-enum-wrong-args.rs:2:8
@@ -110,7 +110,7 @@ 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}`
    |
 note: tuple struct defined here
   --> $DIR/struct-enum-wrong-args.rs:3:8