Better suggestion span for missing type parameter
This commit is contained in:
parent
89ecae5d85
commit
f63d2bc657
7 changed files with 43 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue