about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-06-19 15:10:42 -0700
committerMichael Goulet <michael@errs.io>2022-06-19 15:10:42 -0700
commit4400a26e31363acd7427d47f7dff33da18419fcf (patch)
treefc2bb4173e81151a9b9665276286365966adbd37
parent2b646bd533e8a20c06a71d0b7837e15eb4c79fa8 (diff)
downloadrust-4400a26e31363acd7427d47f7dff33da18419fcf.tar.gz
rust-4400a26e31363acd7427d47f7dff33da18419fcf.zip
Make missing argument placeholder more obvious that it's a placeholder
-rw-r--r--compiler/rustc_typeck/src/check/fn_ctxt/checks.rs4
-rw-r--r--src/test/ui/argument-suggestions/basic.stderr8
-rw-r--r--src/test/ui/argument-suggestions/complex.stderr4
-rw-r--r--src/test/ui/argument-suggestions/issue-96638.stderr4
-rw-r--r--src/test/ui/argument-suggestions/issue-97197.stderr4
-rw-r--r--src/test/ui/argument-suggestions/issue-97484.stderr4
-rw-r--r--src/test/ui/argument-suggestions/missing_arguments.stderr76
-rw-r--r--src/test/ui/argument-suggestions/mixed_cases.stderr24
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-1.stderr8
-rw-r--r--src/test/ui/error-codes/E0057.stderr4
-rw-r--r--src/test/ui/error-codes/E0060.stderr4
-rw-r--r--src/test/ui/error-codes/E0061.stderr8
-rw-r--r--src/test/ui/hrtb/issue-58451.stderr4
-rw-r--r--src/test/ui/issues/issue-18819.stderr4
-rw-r--r--src/test/ui/issues/issue-3044.stderr2
-rw-r--r--src/test/ui/methods/method-call-err-msg.stderr12
-rw-r--r--src/test/ui/mismatched_types/overloaded-calls-bad.stderr8
-rw-r--r--src/test/ui/not-enough-arguments.stderr8
-rw-r--r--src/test/ui/suggestions/args-instead-of-tuple-errors.stderr12
-rw-r--r--src/test/ui/tuple/wrong_argument_ice-3.stderr4
-rw-r--r--src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr4
-rw-r--r--src/test/ui/typeck/struct-enum-wrong-args.stderr16
22 files changed, 114 insertions, 112 deletions
diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
index 93ca8e2237f..2326c4069e4 100644
--- a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
+++ b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
@@ -955,8 +955,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         let input_ty = self.resolve_vars_if_possible(expected_ty);
                         if input_ty.is_unit() {
                             "()".to_string()
+                        } else if !input_ty.is_ty_var() {
+                            format!("/* {} */", input_ty)
                         } else {
-                            format!("{{{}}}", input_ty)
+                            "/* value */".to_string()
                         }
                     };
                     suggestion += &suggestion_text;
diff --git a/src/test/ui/argument-suggestions/basic.stderr b/src/test/ui/argument-suggestions/basic.stderr
index b44e77b43f8..dd4812b5b25 100644
--- a/src/test/ui/argument-suggestions/basic.stderr
+++ b/src/test/ui/argument-suggestions/basic.stderr
@@ -41,8 +41,8 @@ LL | fn missing(_i: u32) {}
    |    ^^^^^^^ -------
 help: provide the argument
    |
-LL |     missing({u32});
-   |     ~~~~~~~~~~~~~~
+LL |     missing(/* u32 */);
+   |     ~~~~~~~~~~~~~~~~~~
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/basic.rs:23:5
@@ -94,8 +94,8 @@ LL |     let closure = |x| x;
    |                   ^^^
 help: provide the argument
    |
-LL |     closure({_});
-   |     ~~~~~~~~~~~~
+LL |     closure(/* value */);
+   |     ~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/argument-suggestions/complex.stderr b/src/test/ui/argument-suggestions/complex.stderr
index c628f7dff34..fa030a8f49d 100644
--- a/src/test/ui/argument-suggestions/complex.stderr
+++ b/src/test/ui/argument-suggestions/complex.stderr
@@ -11,8 +11,8 @@ LL | fn complex(_i: u32, _s: &str, _e: E, _f: F, _g: G, _x: X, _y: Y, _z: Z ) {}
    |    ^^^^^^^ -------  --------  -----  -----  -----  -----  -----  ------
 help: did you mean
    |
-LL |   complex({u32}, &"", {E}, F::X2, G{}, X {}, Y {}, Z {});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   complex(/* u32 */, &"", /* E */, F::X2, G{}, X {}, Y {}, Z {});
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/argument-suggestions/issue-96638.stderr b/src/test/ui/argument-suggestions/issue-96638.stderr
index 35190e2ca0d..8af31b8b751 100644
--- a/src/test/ui/argument-suggestions/issue-96638.stderr
+++ b/src/test/ui/argument-suggestions/issue-96638.stderr
@@ -11,8 +11,8 @@ LL | fn f(_: usize, _: &usize, _: usize) {}
    |    ^ --------  ---------  --------
 help: provide the argument
    |
-LL |     f({usize}, &x, {usize});
-   |     ~~~~~~~~~~~~~~~~~~~~~~~
+LL |     f(/* usize */, &x, /* usize */);
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/argument-suggestions/issue-97197.stderr b/src/test/ui/argument-suggestions/issue-97197.stderr
index 10689d50957..ac54adc5eeb 100644
--- a/src/test/ui/argument-suggestions/issue-97197.stderr
+++ b/src/test/ui/argument-suggestions/issue-97197.stderr
@@ -11,8 +11,8 @@ LL | pub fn g(a1: (), a2: bool, a3: bool, a4: bool, a5: bool, a6: ()) -> () {}
    |        ^ ------  --------  --------  --------  --------  ------
 help: provide the arguments
    |
-LL |     g((), {bool}, {bool}, {bool}, {bool}, ());
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     g((), /* bool */, /* bool */, /* bool */, /* bool */, ());
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/argument-suggestions/issue-97484.stderr b/src/test/ui/argument-suggestions/issue-97484.stderr
index 62ddabea0d7..2af24d521f3 100644
--- a/src/test/ui/argument-suggestions/issue-97484.stderr
+++ b/src/test/ui/argument-suggestions/issue-97484.stderr
@@ -19,8 +19,8 @@ LL +     foo(&&A, B, C, D, E, F, G);
    |
 help: remove the extra arguments
    |
-LL |     foo(&&A, D, {&E}, G);
-   |     ~~~~~~~~~~~~~~~~~~~~
+LL |     foo(&&A, D, /* &E */, G);
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/argument-suggestions/missing_arguments.stderr b/src/test/ui/argument-suggestions/missing_arguments.stderr
index 5236d15b945..2509d22d7ff 100644
--- a/src/test/ui/argument-suggestions/missing_arguments.stderr
+++ b/src/test/ui/argument-suggestions/missing_arguments.stderr
@@ -11,8 +11,8 @@ LL | fn one_arg(_a: i32) {}
    |    ^^^^^^^ -------
 help: provide the argument
    |
-LL |   one_arg({i32});
-   |   ~~~~~~~~~~~~~~
+LL |   one_arg(/* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 0 arguments were supplied
   --> $DIR/missing_arguments.rs:14:3
@@ -27,8 +27,8 @@ LL | fn two_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^ -------  -------
 help: provide the arguments
    |
-LL |   two_same({i32}, {i32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~
+LL |   two_same(/* i32 */, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:15:3
@@ -43,8 +43,8 @@ LL | fn two_same(_a: i32, _b: i32) {}
    |    ^^^^^^^^ -------  -------
 help: provide the argument
    |
-LL |   two_same(1, {i32});
-   |   ~~~~~~~~~~~~~~~~~~
+LL |   two_same(1, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 0 arguments were supplied
   --> $DIR/missing_arguments.rs:16:3
@@ -59,8 +59,8 @@ LL | fn two_diff(_a: i32, _b: f32) {}
    |    ^^^^^^^^ -------  -------
 help: provide the arguments
    |
-LL |   two_diff({i32}, {f32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~
+LL |   two_diff(/* i32 */, /* f32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:17:3
@@ -75,8 +75,8 @@ LL | fn two_diff(_a: i32, _b: f32) {}
    |    ^^^^^^^^ -------  -------
 help: provide the argument
    |
-LL |   two_diff(1, {f32});
-   |   ~~~~~~~~~~~~~~~~~~
+LL |   two_diff(1, /* f32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:18:3
@@ -91,8 +91,8 @@ LL | fn two_diff(_a: i32, _b: f32) {}
    |    ^^^^^^^^ -------  -------
 help: provide the argument
    |
-LL |   two_diff({i32}, 1.0);
-   |   ~~~~~~~~~~~~~~~~~~~~
+LL |   two_diff(/* i32 */, 1.0);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 0 arguments were supplied
   --> $DIR/missing_arguments.rs:21:3
@@ -107,8 +107,8 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {}
    |    ^^^^^^^^^^ -------  -------  -------
 help: provide the arguments
    |
-LL |   three_same({i32}, {i32}, {i32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_same(/* i32 */, /* i32 */, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:22:3
@@ -123,8 +123,8 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {}
    |    ^^^^^^^^^^ -------  -------  -------
 help: provide the arguments
    |
-LL |   three_same(1, {i32}, {i32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_same(1, /* i32 */, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:23:3
@@ -139,8 +139,8 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {}
    |    ^^^^^^^^^^ -------  -------  -------
 help: provide the argument
    |
-LL |   three_same(1, 1, {i32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_same(1, 1, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:26:3
@@ -155,8 +155,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the argument
    |
-LL |   three_diff({i32}, 1.0, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(/* i32 */, 1.0, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:27:3
@@ -171,8 +171,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the argument
    |
-LL |   three_diff(1, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(1, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:28:3
@@ -187,8 +187,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the argument
    |
-LL |   three_diff(1, 1.0, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(1, 1.0, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:29:3
@@ -203,8 +203,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the arguments
    |
-LL |   three_diff({i32}, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(/* i32 */, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:30:3
@@ -222,8 +222,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the arguments
    |
-LL |   three_diff({i32}, 1.0, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(/* i32 */, 1.0, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 1 argument was supplied
   --> $DIR/missing_arguments.rs:31:3
@@ -238,8 +238,8 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the arguments
    |
-LL |   three_diff(1, {f32}, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_diff(1, /* f32 */, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 4 arguments but 0 arguments were supplied
   --> $DIR/missing_arguments.rs:34:3
@@ -254,8 +254,8 @@ LL | fn four_repeated(_a: i32, _b: f32, _c: f32, _d: &str) {}
    |    ^^^^^^^^^^^^^ -------  -------  -------  --------
 help: provide the arguments
    |
-LL |   four_repeated({i32}, {f32}, {f32}, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   four_repeated(/* i32 */, /* f32 */, /* f32 */, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 4 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:35:3
@@ -270,8 +270,8 @@ LL | fn four_repeated(_a: i32, _b: f32, _c: f32, _d: &str) {}
    |    ^^^^^^^^^^^^^ -------  -------  -------  --------
 help: provide the arguments
    |
-LL |   four_repeated(1, {f32}, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   four_repeated(1, /* f32 */, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 5 arguments but 0 arguments were supplied
   --> $DIR/missing_arguments.rs:38:3
@@ -286,8 +286,8 @@ LL | fn complex(_a: i32, _b: f32, _c: i32, _d: f32, _e: &str) {}
    |    ^^^^^^^ -------  -------  -------  -------  --------
 help: provide the arguments
    |
-LL |   complex({i32}, {f32}, {i32}, {f32}, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   complex(/* i32 */, /* f32 */, /* i32 */, /* f32 */, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 5 arguments but 2 arguments were supplied
   --> $DIR/missing_arguments.rs:39:3
@@ -302,8 +302,8 @@ LL | fn complex(_a: i32, _b: f32, _c: i32, _d: f32, _e: &str) {}
    |    ^^^^^^^ -------  -------  -------  -------  --------
 help: provide the arguments
    |
-LL |   complex(1, {f32}, {i32}, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   complex(1, /* f32 */, /* i32 */, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 19 previous errors
 
diff --git a/src/test/ui/argument-suggestions/mixed_cases.stderr b/src/test/ui/argument-suggestions/mixed_cases.stderr
index 78765335c02..3fe4473a594 100644
--- a/src/test/ui/argument-suggestions/mixed_cases.stderr
+++ b/src/test/ui/argument-suggestions/mixed_cases.stderr
@@ -13,8 +13,8 @@ LL | fn two_args(_a: i32, _b: f32) {}
    |    ^^^^^^^^ -------  -------
 help: remove the extra argument
    |
-LL |   two_args(1, {f32});
-   |   ~~~~~~~~~~~~~~~~~~
+LL |   two_args(1, /* f32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 4 arguments were supplied
   --> $DIR/mixed_cases.rs:11:3
@@ -32,8 +32,8 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: did you mean
    |
-LL |   three_args(1, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_args(1, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/mixed_cases.rs:14:3
@@ -51,8 +51,8 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: provide the argument
    |
-LL |   three_args(1, {f32}, {&str});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_args(1, /* f32 */, /* &str */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/mixed_cases.rs:17:3
@@ -69,8 +69,8 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: did you mean
    |
-LL |   three_args(1, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_args(1, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/mixed_cases.rs:20:3
@@ -88,8 +88,8 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: swap these arguments
    |
-LL |   three_args(1, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_args(1, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> $DIR/mixed_cases.rs:23:3
@@ -108,8 +108,8 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
    |    ^^^^^^^^^^ -------  -------  --------
 help: did you mean
    |
-LL |   three_args(1, {f32}, "");
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   three_args(1, /* f32 */, "");
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr
index 9acf1e93b07..176bec819d6 100644
--- a/src/test/ui/c-variadic/variadic-ffi-1.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr
@@ -17,8 +17,8 @@ LL |     fn foo(f: isize, x: u8, ...);
    |        ^^^
 help: provide the arguments
    |
-LL |         foo({isize}, {u8});
-   |         ~~~~~~~~~~~~~~~~~~
+LL |         foo(/* isize */, /* u8 */);
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0060]: this function takes at least 2 arguments but 1 argument was supplied
   --> $DIR/variadic-ffi-1.rs:21:9
@@ -33,8 +33,8 @@ LL |     fn foo(f: isize, x: u8, ...);
    |        ^^^
 help: provide the argument
    |
-LL |         foo(1, {u8});
-   |         ~~~~~~~~~~~~
+LL |         foo(1, /* u8 */);
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/variadic-ffi-1.rs:23:56
diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr
index 4b4d30a8387..3697b5fcf15 100644
--- a/src/test/ui/error-codes/E0057.stderr
+++ b/src/test/ui/error-codes/E0057.stderr
@@ -11,8 +11,8 @@ LL |     let f = |x| x * 3;
    |             ^^^
 help: provide the argument
    |
-LL |     let a = f({_});
-   |             ~~~~~~
+LL |     let a = f(/* value */);
+   |             ~~~~~~~~~~~~~~
 
 error[E0057]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/E0057.rs:5:13
diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr
index 9dd649239e2..644fd598338 100644
--- a/src/test/ui/error-codes/E0060.stderr
+++ b/src/test/ui/error-codes/E0060.stderr
@@ -11,8 +11,8 @@ LL |     fn printf(_: *const u8, ...) -> u32;
    |        ^^^^^^
 help: provide the argument
    |
-LL |     unsafe { printf({*const u8}); }
-   |              ~~~~~~~~~~~~~~~~~~~
+LL |     unsafe { printf(/* *const u8 */); }
+   |              ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr
index f92c548f2de..fa55db0924d 100644
--- a/src/test/ui/error-codes/E0061.stderr
+++ b/src/test/ui/error-codes/E0061.stderr
@@ -11,8 +11,8 @@ LL | fn f(a: u16, b: &str) {}
    |    ^ ------  -------
 help: provide the argument
    |
-LL |     f(0, {&str});
-   |     ~~~~~~~~~~~~
+LL |     f(0, /* &str */);
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/E0061.rs:9:5
@@ -27,8 +27,8 @@ LL | fn f2(a: u16) {}
    |    ^^ ------
 help: provide the argument
    |
-LL |     f2({u16});
-   |     ~~~~~~~~~
+LL |     f2(/* u16 */);
+   |     ~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/hrtb/issue-58451.stderr b/src/test/ui/hrtb/issue-58451.stderr
index d2b3b1c2aa0..22ba63c3e86 100644
--- a/src/test/ui/hrtb/issue-58451.stderr
+++ b/src/test/ui/hrtb/issue-58451.stderr
@@ -11,8 +11,8 @@ LL | fn f<I>(i: I)
    |    ^    ----
 help: provide the argument
    |
-LL |     f(&[f({_})]);
-   |         ~~~~~~
+LL |     f(&[f(/* value */)]);
+   |         ~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-18819.stderr b/src/test/ui/issues/issue-18819.stderr
index db228fded6e..6499dd0d81b 100644
--- a/src/test/ui/issues/issue-18819.stderr
+++ b/src/test/ui/issues/issue-18819.stderr
@@ -20,8 +20,8 @@ LL |     print_x(&X);
    |             ~~
 help: provide the argument
    |
-LL |     print_x({&dyn Foo<Item = bool>}, {&str});
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     print_x(/* &dyn Foo<Item = bool> */, /* &str */);
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-3044.stderr b/src/test/ui/issues/issue-3044.stderr
index 5bb07cfda21..6dbe6b59391 100644
--- a/src/test/ui/issues/issue-3044.stderr
+++ b/src/test/ui/issues/issue-3044.stderr
@@ -25,7 +25,7 @@ LL |     fn fold<B, F>(mut self, init: B, mut f: F) -> B
 help: provide the argument
    |
 LL ~     needlesArr.iter().fold(|x, y| {
-LL ~     }, {_});
+LL ~     }, /* value */);
    |
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr
index 53e582f7f13..95edee6ad23 100644
--- a/src/test/ui/methods/method-call-err-msg.stderr
+++ b/src/test/ui/methods/method-call-err-msg.stderr
@@ -27,8 +27,8 @@ LL |     fn one(self, _: isize) -> Foo { self }
    |        ^^^ ----  --------
 help: provide the argument
    |
-LL |      .one({isize})
-   |       ~~~~~~~~~~~~
+LL |      .one(/* isize */)
+   |       ~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/method-call-err-msg.rs:15:7
@@ -43,8 +43,8 @@ LL |     fn two(self, _: isize, _: isize) -> Foo { self }
    |        ^^^ ----  --------  --------
 help: provide the argument
    |
-LL |      .two(0, {isize});
-   |       ~~~~~~~~~~~~~~~
+LL |      .two(0, /* isize */);
+   |       ~~~~~~~~~~~~~~~~~~~
 
 error[E0599]: `Foo` is not an iterator
   --> $DIR/method-call-err-msg.rs:19:7
@@ -89,8 +89,8 @@ LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
    |        ^^^^^    ----  ----  ----  ----
 help: provide the arguments
    |
-LL |     y.three::<usize>({usize}, {usize}, {usize});
-   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     y.three::<usize>(/* usize */, /* usize */, /* usize */);
+   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
index a5742d6fe8c..4000b2ba312 100644
--- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
+++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
@@ -25,8 +25,8 @@ LL |     extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
    |                           ^^^^^^^^
 help: provide the argument
    |
-LL |     let ans = s({isize});
-   |               ~~~~~~~~~~
+LL |     let ans = s(/* isize */);
+   |               ~~~~~~~~~~~~~~
 
 error[E0057]: this function takes 1 argument but 2 arguments were supplied
   --> $DIR/overloaded-calls-bad.rs:31:15
@@ -43,8 +43,8 @@ LL |     extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
    |                           ^^^^^^^^
 help: remove the extra argument
    |
-LL |     let ans = s({isize});
-   |               ~~~~~~~~~~
+LL |     let ans = s(/* isize */);
+   |               ~~~~~~~~~~~~~~
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/not-enough-arguments.stderr b/src/test/ui/not-enough-arguments.stderr
index 4f502acc95c..b1df578ea80 100644
--- a/src/test/ui/not-enough-arguments.stderr
+++ b/src/test/ui/not-enough-arguments.stderr
@@ -11,8 +11,8 @@ LL | fn foo(a: isize, b: isize, c: isize, d:isize) {
    |    ^^^ --------  --------  --------  -------
 help: provide the argument
    |
-LL |   foo(1, 2, 3, {isize});
-   |   ~~~~~~~~~~~~~~~~~~~~~
+LL |   foo(1, 2, 3, /* isize */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this function takes 6 arguments but 3 arguments were supplied
   --> $DIR/not-enough-arguments.rs:29:3
@@ -39,8 +39,8 @@ LL |     f: i32,
    |     ------
 help: provide the arguments
    |
-LL |   bar(1, 2, 3, {i32}, {i32}, {i32});
-   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |   bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
+   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr b/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
index aacbe1d9efb..3d367eca707 100644
--- a/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
+++ b/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
@@ -15,8 +15,8 @@ LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^
 help: remove the extra argument
    |
-LL |     let _: Option<(i32, bool)> = Some({(i32, bool)});
-   |                                  ~~~~~~~~~~~~~~~~~~~
+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
@@ -35,8 +35,8 @@ LL | fn int_bool(_: (i32, bool)) {
    |    ^^^^^^^^ --------------
 help: remove the extra argument
    |
-LL |     int_bool({(i32, bool)});
-   |     ~~~~~~~~~~~~~~~~~~~~~~~
+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
@@ -51,8 +51,8 @@ LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^
 help: provide the argument
    |
-LL |     let _: Option<(i8,)> = Some({(i8,)});
-   |                            ~~~~~~~~~~~~~
+LL |     let _: Option<(i8,)> = Some(/* (i8,) */);
+   |                            ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/args-instead-of-tuple-errors.rs:14:34
diff --git a/src/test/ui/tuple/wrong_argument_ice-3.stderr b/src/test/ui/tuple/wrong_argument_ice-3.stderr
index 6ea6e670fd6..667b15776ef 100644
--- a/src/test/ui/tuple/wrong_argument_ice-3.stderr
+++ b/src/test/ui/tuple/wrong_argument_ice-3.stderr
@@ -15,8 +15,8 @@ LL |     pub fn push(&mut self, value: T) {
    |            ^^^^
 help: remove the extra argument
    |
-LL |         groups.push({(Vec<String>, Vec<Process>)});
-   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |         groups.push(/* (Vec<String>, Vec<Process>) */);
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
index 3fc5a3594d8..6ae2aa1dc77 100644
--- a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
+++ b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
@@ -11,8 +11,8 @@ LL |     V(u8)
    |     ^
 help: provide the argument
    |
-LL |     <E>::V({u8});
-   |     ~~~~~~~~~~~~
+LL |     <E>::V(/* u8 */);
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/enum-variant-priority-higher-than-other-inherent.rs:22:17
diff --git a/src/test/ui/typeck/struct-enum-wrong-args.stderr b/src/test/ui/typeck/struct-enum-wrong-args.stderr
index aafb29f25d0..2ea822df275 100644
--- a/src/test/ui/typeck/struct-enum-wrong-args.stderr
+++ b/src/test/ui/typeck/struct-enum-wrong-args.stderr
@@ -45,8 +45,8 @@ LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^
 help: provide the argument
    |
-LL |     let _ = Ok({_});
-   |             ~~~~~~~
+LL |     let _ = Ok(/* value */);
+   |             ~~~~~~~~~~~~~~~
 
 error[E0061]: this struct takes 1 argument but 0 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:9:13
@@ -61,8 +61,8 @@ LL | struct Wrapper(i32);
    |        ^^^^^^^
 help: provide the argument
    |
-LL |     let _ = Wrapper({i32});
-   |             ~~~~~~~~~~~~~~
+LL |     let _ = Wrapper(/* i32 */);
+   |             ~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this struct takes 1 argument but 2 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:10:13
@@ -93,8 +93,8 @@ LL | struct DoubleWrapper(i32, i32);
    |        ^^^^^^^^^^^^^
 help: provide the arguments
    |
-LL |     let _ = DoubleWrapper({i32}, {i32});
-   |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     let _ = DoubleWrapper(/* i32 */, /* i32 */);
+   |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this struct takes 2 arguments but 1 argument was supplied
   --> $DIR/struct-enum-wrong-args.rs:12:13
@@ -109,8 +109,8 @@ LL | struct DoubleWrapper(i32, i32);
    |        ^^^^^^^^^^^^^
 help: provide the argument
    |
-LL |     let _ = DoubleWrapper(5, {i32});
-   |             ~~~~~~~~~~~~~~~~~~~~~~~
+LL |     let _ = DoubleWrapper(5, /* i32 */);
+   |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
   --> $DIR/struct-enum-wrong-args.rs:13:13