Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errors
Convert predicates into Predicate in the Obligation constructor instead of having almost all callers do that. This reduces a bit of boilerplate, and also paves the way for my work towards https://github.com/rust-lang/compiler-team/issues/531 (as it makes it easier to accept both goals and clauses where right now it only accepts predicates).
This commit is contained in:
commit
ed97f245f1
49 changed files with 259 additions and 235 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue