Reduce the number of constraints repeated when writing T: SomeTrait
by sgrif · Pull Request #1927 · rust-lang/rfcs (original) (raw)
When it says that Self
appearing in the target means that the constraint will be inherited (elaborated?), does that include associated type projections (e.g. Self::Foo: Trait
)? Either way, could that be explicitly mentioned?
EDIT: More specifically:
trait A { type Foo: X; } trait B: A where ::Foo: Y {}
Would claiming Bar: B
elaborate to Bar::Foo: Y
?
EDIT EDIT:
And and and extending off of @durka, elaborating everything would allow the derive macros to do the right thing w.r.t. associated types and type parameters in struct members by just requiring pointwise implementations of the actual member types instead of today's weird undescribable horro- I mean approximation.