Change sized_constraints to return EarlyBinder

This commit is contained in:
Jack Huey 2022-08-03 00:14:24 -04:00
parent e21624dc80
commit 96a69dce2c
4 changed files with 10 additions and 5 deletions

View file

@ -1883,7 +1883,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let sized_crit = def.sized_constraint(self.tcx());
// (*) binder moved here
Where(obligation.predicate.rebind({
sized_crit.iter().map(|ty| EarlyBinder(*ty).subst(self.tcx(), substs)).collect()
sized_crit
.0
.iter()
.map(|ty| sized_crit.rebind(*ty).subst(self.tcx(), substs))
.collect()
}))
}