Convert predicates into Predicate in the Obligation constructor

This commit is contained in:
Oli Scherer 2022-11-09 10:49:28 +00:00
parent 634df06fae
commit 4f11f3b257
49 changed files with 252 additions and 228 deletions

View file

@ -445,7 +445,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
ty::PredicateKind::Trait(t) => {
let t = bound_predicate.rebind(t);
debug_assert!(!t.has_escaping_bound_vars());
let obligation = obligation.with(t);
let obligation = obligation.with(self.tcx(), t);
self.evaluate_trait_predicate_recursively(previous_stack, obligation)
}
@ -596,7 +596,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
ty::PredicateKind::Projection(data) => {
let data = bound_predicate.rebind(data);
let project_obligation = obligation.with(data);
let project_obligation = obligation.with(self.tcx(), data);
match project::poly_project_and_unify_type(self, &project_obligation) {
ProjectAndUnifyResult::Holds(mut subobligations) => {
'compute_res: {