Make missing argument placeholder more obvious that it's a placeholder
This commit is contained in:
parent
2b646bd533
commit
4400a26e31
22 changed files with 114 additions and 112 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue