Same trait with different input concrete parameters are considered duplicate bounds (: Bound<i8> + Bound<u8>
)
#22279
Labels
A-type-system
Area: Type system
STR
Due to multidispatch
: Bound<i8> + Bound<u8>
is a valid bound, but the compiler is rejecting it in some positions (supertraits and bounds in parameter list), but not in others (where clauses)Workaround for the supertrait
You can use dummy intermediate traits to indirectly add the "duplicate" bounds, but this is very verbose.
Version
cc @nikomatsakis
Originally reported in #18693 (Niko preferred opening a new issue, instead of re-opening the old one and modifying the original report)
The text was updated successfully, but these errors were encountered: