Replacing bound vars is actually instantiating a binder
This commit is contained in:
parent
bd39bbb4bb
commit
03a8a4ff3e
28 changed files with 67 additions and 60 deletions
|
@ -74,7 +74,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
|||
)
|
||||
}
|
||||
ty::PredicateKind::Subtype(pred) => {
|
||||
let (a, b) = infcx.replace_bound_vars_with_placeholders(
|
||||
let (a, b) = infcx.instantiate_binder_with_placeholders(
|
||||
goal.predicate.kind().rebind((pred.a, pred.b)),
|
||||
);
|
||||
let expected_found = ExpectedFound::new(true, a, b);
|
||||
|
@ -84,7 +84,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
|||
)
|
||||
}
|
||||
ty::PredicateKind::Coerce(pred) => {
|
||||
let (a, b) = infcx.replace_bound_vars_with_placeholders(
|
||||
let (a, b) = infcx.instantiate_binder_with_placeholders(
|
||||
goal.predicate.kind().rebind((pred.a, pred.b)),
|
||||
);
|
||||
let expected_found = ExpectedFound::new(false, a, b);
|
||||
|
@ -94,7 +94,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
|||
)
|
||||
}
|
||||
ty::PredicateKind::ConstEquate(a, b) => {
|
||||
let (a, b) = infcx.replace_bound_vars_with_placeholders(
|
||||
let (a, b) = infcx.instantiate_binder_with_placeholders(
|
||||
goal.predicate.kind().rebind((a, b)),
|
||||
);
|
||||
let expected_found = ExpectedFound::new(true, a, b);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue