You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This errors because the bound on Foo::a isn't satisfied (specifically Param<RUNTIME>: Sub<Self::Fx>) Now one way to do this is maybe make the compiler know that Sub is a transitive trait, such that A: Sub<B>, B: Sub<C> would together imply A: Sub<C>. But that could be very complicated.
I'm not entirely sure how else to approach it. There might be other desugarings that would make this work, but none was able to escape this transitive implication thing I think.
The text was updated successfully, but these errors were encountered:
We'll start with the sugar version:
This currently fails compilation, and making a desugaring that makes this work is apparently hard. I'll illustrate this issue by first desugaring it.
Note that this desugaring uses some types from a PR that has not yet landed. See this diff for more info.
This errors because the bound on
Foo::a
isn't satisfied (specificallyParam<RUNTIME>: Sub<Self::Fx>
) Now one way to do this is maybe make the compiler know thatSub
is a transitive trait, such thatA: Sub<B>, B: Sub<C>
would together implyA: Sub<C>
. But that could be very complicated.I'm not entirely sure how else to approach it. There might be other desugarings that would make this work, but none was able to escape this transitive implication thing I think.
The text was updated successfully, but these errors were encountered: