1
Fork 0

Better suggestion span for missing type parameter

This commit is contained in:
Esteban Küber 2024-07-03 21:02:27 +00:00
parent 89ecae5d85
commit f63d2bc657
7 changed files with 43 additions and 12 deletions

View file

@ -5,9 +5,13 @@ LL | trait A<T=Self> {}
| --------------- type parameter `T` must be specified for this
LL |
LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
| ^ help: set the type parameter to the desired type: `A<T>`
| ^
|
= note: because of the default `Self` reference, type parameters must be specified on object types
help: set the type parameter to the desired type
|
LL | fn together_we_will_rule_the_galaxy(son: &dyn A<T>) {}
| +++
error: aborting due to 1 previous error