Replacing bound vars is actually instantiating a binder
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user