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
trait Foo {
type T<'a>: Sized where Self: 'a;
}
impl Foo for &() {
type T<'a> = ();
}
This fails in the old solver, passes in the new solver. This fails in the old solver because in check_type_bounds we normalize the item bound like <&() as Foo>::T<'a>: Sized into (): Sized, but when normalizing we also require proving the GAT where clauses hold.
In the new solver we simply structurally replace instances of GATs with their definition type using the ReplaceTy folder, which is a kind of "normalization" but which doesn't require that the GAT where clauses hold.
For now, we could just register the GAT bounds in check_type_bounds to paper over this problem, though I think we could think harder about how and where GAT where clauses are required to hold in normalization...
The text was updated successfully, but these errors were encountered:
This fails in the old solver, passes in the new solver. This fails in the old solver because in
check_type_bounds
we normalize the item bound like<&() as Foo>::T<'a>: Sized
into(): Sized
, but when normalizing we also require proving the GAT where clauses hold.In the new solver we simply structurally replace instances of GATs with their definition type using the
ReplaceTy
folder, which is a kind of "normalization" but which doesn't require that the GAT where clauses hold.For now, we could just register the GAT bounds in
check_type_bounds
to paper over this problem, though I think we could think harder about how and where GAT where clauses are required to hold in normalization...The text was updated successfully, but these errors were encountered: