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
when generalizing a projection we have to be careful of 2 things, using ?ident.universe for inference variables in a given universe.
?x sub <() as Trait<?y>>::Assoc
must not generalize ?x to <() as Trait<?y>>::Assoc as ?x may get inferred to a subtype of the normalized projection. Otherwise this would be incomplete. Should emit AliasRelate in this case instead.
?x.0 eq <() as Trait<?y.1>>::Assoc
This must not generalize ?x.0 to <() as Trait<?z.1>>::Assoc because that should result in a universe error but it must also not relate it to <() as Trait<?z.0>>::Assoc because the projection may not actually normalize to a type mentioning z so if we then equate the substs in AliasRelate we end up pulling down the universe of ?y to 0 as well which would be incomplete. Should instead emit AliasRelate(?x.0, <() as Trait<?y.1>>::Assoc, Equate).
The text was updated successfully, but these errors were encountered:
when generalizing a projection we have to be careful of 2 things, using
?ident.universe
for inference variables in a given universe.?x
sub<() as Trait<?y>>::Assoc
must not generalize
?x
to<() as Trait<?y>>::Assoc
as?x
may get inferred to a subtype of the normalized projection. Otherwise this would be incomplete. Should emitAliasRelate
in this case instead.?x.0 eq <() as Trait<?y.1>>::Assoc
This must not generalize
?x.0
to<() as Trait<?z.1>>::Assoc
because that should result in a universe error but it must also not relate it to<() as Trait<?z.0>>::Assoc
because the projection may not actually normalize to a type mentioningz
so if we then equate the substs inAliasRelate
we end up pulling down the universe of?y
to0
as well which would be incomplete. Should instead emitAliasRelate(?x.0, <() as Trait<?y.1>>::Assoc, Equate)
.The text was updated successfully, but these errors were encountered: