print argument name in arg mismatch if possible
This commit is contained in:
parent
984eab57f7
commit
f034cb431d
5 changed files with 15 additions and 8 deletions
|
|
@ -94,8 +94,8 @@ LL | let closure = |x| x;
|
|||
| ^^^
|
||||
help: provide the argument
|
||||
|
|
||||
LL | closure(/* value */);
|
||||
| ~~~~~~~~~~~~~
|
||||
LL | closure(/* x */);
|
||||
| ~~~~~~~~~
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ LL | let f = |x| x * 3;
|
|||
| ^^^
|
||||
help: provide the argument
|
||||
|
|
||||
LL | let a = f(/* value */);
|
||||
| ~~~~~~~~~~~~~
|
||||
LL | let a = f(/* x */);
|
||||
| ~~~~~~~~~
|
||||
|
||||
error[E0057]: this function takes 1 argument but 2 arguments were supplied
|
||||
--> $DIR/E0057.rs:5:13
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ LL | fn f<I>(i: I)
|
|||
| ^ ----
|
||||
help: provide the argument
|
||||
|
|
||||
LL | f(&[f(/* value */)]);
|
||||
| ~~~~~~~~~~~~~
|
||||
LL | f(&[f(/* i */)]);
|
||||
| ~~~~~~~~~
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ help: provide the argument
|
|||
|
|
||||
LL ~ needlesArr.iter().fold(|x, y| {
|
||||
LL +
|
||||
LL ~ }, /* value */);
|
||||
LL ~ }, /* f */);
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue