Point at individual type arguments on arg count mismatch
This commit is contained in:
parent
8e595f5610
commit
28859472f7
6 changed files with 76 additions and 29 deletions
|
|
@ -1,8 +1,8 @@
|
|||
error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
|
||||
--> $DIR/issue-36708.rs:8:11
|
||||
--> $DIR/issue-36708.rs:8:12
|
||||
|
|
||||
LL | fn foo<T>() {}
|
||||
| ^^^ found 1 type parameter, expected 0
|
||||
| ^ found 1 type parameter, expected 0
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
|
||||
--> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:11
|
||||
--> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:22
|
||||
|
|
||||
LL | fn foo(&self, t: Self::T);
|
||||
| -------------------------- expected 0 type parameters
|
||||
| - expected 0 type parameters
|
||||
...
|
||||
LL | fn foo(&self, t: impl Clone) {}
|
||||
| ^ found 1 type parameter
|
||||
| ^^^^^^^^^^ found 1 type parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue