Default impls cannot take into account associate types #52396
Labels
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Suppose I have some trait with a default method:
and I want to add an associated type:
This is a breaking change unless I move the old default method to a new
default impl
. But there is no way to condition thedefault impl
on choice the choice of associated type. For example:is prohibited, and both
and
do the wrong thing.
The text was updated successfully, but these errors were encountered: