1
Fork 0

Properly report error when object type param default references self

This commit is contained in:
Michael Goulet 2025-01-24 04:06:47 +00:00
parent 99768c80a1
commit ea9a253ff1
11 changed files with 71 additions and 21 deletions

View file

@ -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>) {}