diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs index 93ca8e2237f1f..2326c4069e483 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 b44e77b43f8bf..dd4812b5b2589 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 c628f7dff3466..fa030a8f49d8c 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 35190e2ca0d82..8af31b8b751f3 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 10689d5095748..ac54adc5eeb92 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 62ddabea0d72d..2af24d521f380 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 5236d15b94574..2509d22d7ff82 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 78765335c0218..3fe4473a594e0 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 9acf1e93b0773..176bec819d67a 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 4b4d30a8387fe..3697b5fcf154d 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 9dd649239e29f..644fd59833878 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 f92c548f2de1f..fa55db0924d29 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 d2b3b1c2aa0e5..22ba63c3e86f0 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) | ^ ---- 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 db228fded6e40..6499dd0d81b1c 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}, {&str}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL | print_x(/* &dyn Foo */, /* &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 5bb07cfda2142..6dbe6b59391e3 100644 --- a/src/test/ui/issues/issue-3044.stderr +++ b/src/test/ui/issues/issue-3044.stderr @@ -25,7 +25,7 @@ LL | fn fold(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 53e582f7f13a4..95edee6ad23e8 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(self, _: T, _: T, _: T) -> Foo { self } | ^^^^^ ---- ---- ---- ---- help: provide the arguments | -LL | y.three::({usize}, {usize}, {usize}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL | y.three::(/* 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 a5742d6fe8c36..4000b2ba31245 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 4f502acc95cbe..b1df578ea80a9 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 aacbe1d9efb1f..3d367eca707f4 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 6ea6e670fd600..667b15776efd3 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, Vec)}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL | groups.push(/* (Vec, Vec) */); + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 3fc5a3594d852..6ae2aa1dc774d 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 | ::V({u8}); - | ~~~~~~~~~~~~ +LL | ::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 aafb29f25d0bd..2ea822df27509 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