Use verbose suggestion for "wrong # of generics"
This commit is contained in:
parent
2a1c384f0e
commit
c807ac0340
52 changed files with 811 additions and 401 deletions
|
@ -2,9 +2,7 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
|
|||
--> $DIR/explicit-generic-args-for-impl.rs:4:5
|
||||
|
|
||||
LL | foo::<str, String>("".to_string());
|
||||
| ^^^ ------ help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: function defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/explicit-generic-args-for-impl.rs:1:4
|
||||
|
@ -12,6 +10,11 @@ note: function defined here, with 1 generic parameter: `T`
|
|||
LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
|
||||
| ^^^ -
|
||||
= note: `impl Trait` cannot be explicitly specified as a generic argument
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - foo::<str, String>("".to_string());
|
||||
LL + foo::<str, >("".to_string());
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue