Trait associated types where Self: Sized
interact oddly with dyn safety
#106522
Labels
A-trait-objects
Area: trait objects, vtable layout
C-bug
Category: This is a bug.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Given the trait
we get that
&dyn Trait
is not valid,&dyn Trait<Assoc=()>
is valid,The error message says that the call to
Trait::method
introduces aSelf: Sized
bound. There is no such bound onmethod
, however; the bound is onTrait::Assoc
.I have no clue what the "correct" behavior is for this, but it's probably not this.
The text was updated successfully, but these errors were encountered: