1
Fork 0

Auto merge of #104846 - spastorino:santa-clauses-make-goals-early-christmas-🎄, r=oli-obk

Branch Clause from Predicate

r? `@oli-obk`

This is part of what's proposed in https://github.com/rust-lang/compiler-team/issues/531
This commit is contained in:
bors 2022-11-25 15:59:31 +00:00
commit 051cab2b84
85 changed files with 625 additions and 496 deletions

View file

@ -634,12 +634,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 })
}