Fix subst issue with object_ty_for_trait

This commit is contained in:
Michael Goulet 2023-02-08 02:34:23 +00:00
parent 8cca42a47f
commit 8dadd54f52

View File

@ -646,11 +646,9 @@ fn object_ty_for_trait<'tcx>(
debug!(?obligation); debug!(?obligation);
let pred = obligation.predicate.to_opt_poly_projection_pred()?; let pred = obligation.predicate.to_opt_poly_projection_pred()?;
Some(pred.map_bound(|p| { Some(pred.map_bound(|p| {
ty::ExistentialPredicate::Projection(ty::ExistentialProjection { ty::ExistentialPredicate::Projection(ty::ExistentialProjection::erase_self_ty(
def_id: p.projection_ty.def_id, tcx, p,
substs: p.projection_ty.substs, ))
term: p.term,
})
})) }))
}) })
.collect(); .collect();