Properly report error when object type param default references self
This commit is contained in:
parent
99768c80a1
commit
ea9a253ff1
11 changed files with 71 additions and 21 deletions
|
@ -7,7 +7,7 @@ LL |
|
|||
LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
|
||||
| ^
|
||||
|
|
||||
= note: because of the default `Self` reference, type parameters must be specified on object types
|
||||
= note: because the parameter default references `Self`, the parameter must be specified on the object type
|
||||
help: set the type parameter to the desired type
|
||||
|
|
||||
LL | fn together_we_will_rule_the_galaxy(son: &dyn A<T>) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue