Elaborate param_env predicates when checking if type outlives involving projection holds

This commit is contained in:
Jack Huey 2022-01-09 23:53:57 -05:00
parent e012a191d7
commit ad57295fc9
6 changed files with 90 additions and 6 deletions

View file

@ -206,7 +206,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
})?);
if let ty::Projection(..) = placeholder_self_ty.kind() {
for predicate in tcx.predicates_of(def_id).instantiate_own(tcx, substs).predicates {
let predicates = tcx.predicates_of(def_id).instantiate_own(tcx, substs).predicates;
debug!(?predicates, "projection predicates");
for predicate in predicates {
let normalized = normalize_with_depth_to(
self,
obligation.param_env,