get rid of to_poly_trait_predicate

This commit is contained in:
Oli Scherer
2022-11-18 14:10:36 +00:00
committed by Santiago Pastorino
parent 65a6e22668
commit 08afabddac
12 changed files with 40 additions and 49 deletions

View File

@@ -640,12 +640,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
);
let tr =
ty::Binder::dummy(self.tcx().at(cause.span).mk_trait_ref(LangItem::Sized, [output_ty]));
nested.push(Obligation::new(
self.infcx.tcx,
cause,
obligation.param_env,
tr.to_poly_trait_predicate(),
));
nested.push(Obligation::new(self.infcx.tcx, cause, obligation.param_env, tr));
Ok(ImplSourceFnPointerData { fn_ty: self_ty, nested })
}