Skip to content

Commit f4a917a

Browse files
authored
Rollup merge of rust-lang#107780 - compiler-errors:instantiate-binder, r=lcnr
Rename `replace_bound_vars_with_*` to `instantiate_binder_with_*` Mentioning "binder" rather than "bound vars", imo, makes it clearer that we're doing something to the binder as a whole. Also, "instantiate" is the verb that I'm always reaching for when I'm looking for these functions, and the name that we use in the new solver anyways. r? types
2 parents 894ca96 + 03a8a4f commit f4a917a

File tree

28 files changed

+67
-60
lines changed

28 files changed

+67
-60
lines changed

compiler/rustc_borrowck/src/diagnostics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11391139
if let ty::Adt(def, substs) = ty.kind()
11401140
&& Some(def.did()) == tcx.lang_items().pin_type()
11411141
&& let ty::Ref(_, _, hir::Mutability::Mut) = substs.type_at(0).kind()
1142-
&& let self_ty = infcx.replace_bound_vars_with_fresh_vars(
1142+
&& let self_ty = infcx.instantiate_binder_with_fresh_vars(
11431143
fn_call_span,
11441144
LateBoundRegionConversionTime::FnCall,
11451145
tcx.fn_sig(method_did).subst(tcx, method_substs).input(0),

compiler/rustc_borrowck/src/type_check/input_output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
3838
// so that they represent the view from "inside" the closure.
3939
let user_provided_sig = self
4040
.instantiate_canonical_with_fresh_inference_vars(body.span, &user_provided_poly_sig);
41-
let user_provided_sig = self.infcx.replace_bound_vars_with_fresh_vars(
41+
let user_provided_sig = self.infcx.instantiate_binder_with_fresh_vars(
4242
body.span,
4343
LateBoundRegionConversionTime::FnCall,
4444
user_provided_sig,

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ fn compare_method_predicate_entailment<'tcx>(
246246

247247
let mut wf_tys = FxIndexSet::default();
248248

249-
let unnormalized_impl_sig = infcx.replace_bound_vars_with_fresh_vars(
249+
let unnormalized_impl_sig = infcx.instantiate_binder_with_fresh_vars(
250250
impl_m_span,
251251
infer::HigherRankedType,
252252
tcx.fn_sig(impl_m.def_id).subst_identity(),
@@ -640,7 +640,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
640640
let impl_sig = ocx.normalize(
641641
&norm_cause,
642642
param_env,
643-
infcx.replace_bound_vars_with_fresh_vars(
643+
infcx.instantiate_binder_with_fresh_vars(
644644
return_span,
645645
infer::HigherRankedType,
646646
tcx.fn_sig(impl_m.def_id).subst_identity(),

compiler/rustc_hir_typeck/src/callee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
156156
// fnmut vs fnonce. If so, we have to defer further processing.
157157
if self.closure_kind(substs).is_none() {
158158
let closure_sig = substs.as_closure().sig();
159-
let closure_sig = self.replace_bound_vars_with_fresh_vars(
159+
let closure_sig = self.instantiate_binder_with_fresh_vars(
160160
call_expr.span,
161161
infer::FnCall,
162162
closure_sig,
@@ -437,7 +437,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
437437
// renormalize the associated types at this point, since they
438438
// previously appeared within a `Binder<>` and hence would not
439439
// have been normalized before.
440-
let fn_sig = self.replace_bound_vars_with_fresh_vars(call_expr.span, infer::FnCall, fn_sig);
440+
let fn_sig = self.instantiate_binder_with_fresh_vars(call_expr.span, infer::FnCall, fn_sig);
441441
let fn_sig = self.normalize(call_expr.span, fn_sig);
442442

443443
// Call the generic checker.

compiler/rustc_hir_typeck/src/closure.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
544544
)
545545
.map(|(hir_ty, &supplied_ty)| {
546546
// Instantiate (this part of..) S to S', i.e., with fresh variables.
547-
self.replace_bound_vars_with_fresh_vars(
547+
self.instantiate_binder_with_fresh_vars(
548548
hir_ty.span,
549549
LateBoundRegionConversionTime::FnCall,
550550
// (*) binder moved to here
@@ -566,7 +566,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
566566
all_obligations.extend(obligations);
567567
}
568568

569-
let supplied_output_ty = self.replace_bound_vars_with_fresh_vars(
569+
let supplied_output_ty = self.instantiate_binder_with_fresh_vars(
570570
decl.output.span(),
571571
LateBoundRegionConversionTime::FnCall,
572572
supplied_sig.output(),

compiler/rustc_hir_typeck/src/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
568568
// placeholder lifetimes with probing, we just replace higher lifetimes
569569
// with fresh vars.
570570
let span = args.get(i).map(|a| a.span).unwrap_or(expr.span);
571-
let input = self.replace_bound_vars_with_fresh_vars(
571+
let input = self.instantiate_binder_with_fresh_vars(
572572
span,
573573
infer::LateBoundRegionConversionTime::FnCall,
574574
fn_sig.input(i),
@@ -586,7 +586,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
586586
// Also, as we just want to check sizedness, instead of introducing
587587
// placeholder lifetimes with probing, we just replace higher lifetimes
588588
// with fresh vars.
589-
let output = self.replace_bound_vars_with_fresh_vars(
589+
let output = self.instantiate_binder_with_fresh_vars(
590590
expr.span,
591591
infer::LateBoundRegionConversionTime::FnCall,
592592
fn_sig.output(),

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
289289
item_segment: &hir::PathSegment<'_>,
290290
poly_trait_ref: ty::PolyTraitRef<'tcx>,
291291
) -> Ty<'tcx> {
292-
let trait_ref = self.replace_bound_vars_with_fresh_vars(
292+
let trait_ref = self.instantiate_binder_with_fresh_vars(
293293
span,
294294
infer::LateBoundRegionConversionTime::AssocTypeProjection(item_def_id),
295295
poly_trait_ref,

compiler/rustc_hir_typeck/src/method/confirm.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
262262
let original_poly_trait_ref = principal.with_self_ty(this.tcx, object_ty);
263263
let upcast_poly_trait_ref = this.upcast(original_poly_trait_ref, trait_def_id);
264264
let upcast_trait_ref =
265-
this.replace_bound_vars_with_fresh_vars(upcast_poly_trait_ref);
265+
this.instantiate_binder_with_fresh_vars(upcast_poly_trait_ref);
266266
debug!(
267267
"original_poly_trait_ref={:?} upcast_trait_ref={:?} target_trait={:?}",
268268
original_poly_trait_ref, upcast_trait_ref, trait_def_id
@@ -285,7 +285,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
285285
probe::WhereClausePick(poly_trait_ref) => {
286286
// Where clauses can have bound regions in them. We need to instantiate
287287
// those to convert from a poly-trait-ref to a trait-ref.
288-
self.replace_bound_vars_with_fresh_vars(poly_trait_ref).substs
288+
self.instantiate_binder_with_fresh_vars(poly_trait_ref).substs
289289
}
290290
}
291291
}
@@ -506,7 +506,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
506506
let sig = self.tcx.fn_sig(def_id).subst(self.tcx, all_substs);
507507
debug!("type scheme substituted, sig={:?}", sig);
508508

509-
let sig = self.replace_bound_vars_with_fresh_vars(sig);
509+
let sig = self.instantiate_binder_with_fresh_vars(sig);
510510
debug!("late-bound lifetimes from method instantiated, sig={:?}", sig);
511511

512512
(sig, method_predicates)
@@ -625,10 +625,10 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
625625
upcast_trait_refs.into_iter().next().unwrap()
626626
}
627627

628-
fn replace_bound_vars_with_fresh_vars<T>(&self, value: ty::Binder<'tcx, T>) -> T
628+
fn instantiate_binder_with_fresh_vars<T>(&self, value: ty::Binder<'tcx, T>) -> T
629629
where
630630
T: TypeFoldable<'tcx> + Copy,
631631
{
632-
self.fcx.replace_bound_vars_with_fresh_vars(self.span, infer::FnCall, value)
632+
self.fcx.instantiate_binder_with_fresh_vars(self.span, infer::FnCall, value)
633633
}
634634
}

compiler/rustc_hir_typeck/src/method/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
401401
// with bound regions.
402402
let fn_sig = tcx.fn_sig(def_id).subst(self.tcx, substs);
403403
let fn_sig =
404-
self.replace_bound_vars_with_fresh_vars(obligation.cause.span, infer::FnCall, fn_sig);
404+
self.instantiate_binder_with_fresh_vars(obligation.cause.span, infer::FnCall, fn_sig);
405405

406406
let InferOk { value, obligations: o } =
407407
self.at(&obligation.cause, self.param_env).normalize(fn_sig);

compiler/rustc_hir_typeck/src/method/probe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
924924
ty::AssocKind::Fn => self.probe(|_| {
925925
let substs = self.fresh_substs_for_item(self.span, method.def_id);
926926
let fty = self.tcx.fn_sig(method.def_id).subst(self.tcx, substs);
927-
let fty = self.replace_bound_vars_with_fresh_vars(self.span, infer::FnCall, fty);
927+
let fty = self.instantiate_binder_with_fresh_vars(self.span, infer::FnCall, fty);
928928

929929
if let Some(self_ty) = self_ty {
930930
if self

compiler/rustc_infer/src/infer/equate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> {
129129
let a_types = infcx.tcx.anonymize_bound_vars(a_types);
130130
let b_types = infcx.tcx.anonymize_bound_vars(b_types);
131131
if a_types.bound_vars() == b_types.bound_vars() {
132-
let (a_types, b_types) = infcx.replace_bound_vars_with_placeholders(
132+
let (a_types, b_types) = infcx.instantiate_binder_with_placeholders(
133133
a_types.map_bound(|a_types| (a_types, b_types.skip_binder())),
134134
);
135135
for (a, b) in std::iter::zip(a_types, b_types) {

compiler/rustc_infer/src/infer/higher_ranked/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ impl<'a, 'tcx> CombineFields<'a, 'tcx> {
3838
// First, we instantiate each bound region in the supertype with a
3939
// fresh placeholder region. Note that this automatically creates
4040
// a new universe if needed.
41-
let sup_prime = self.infcx.replace_bound_vars_with_placeholders(sup);
41+
let sup_prime = self.infcx.instantiate_binder_with_placeholders(sup);
4242

4343
// Next, we instantiate each bound region in the subtype
4444
// with a fresh region variable. These region variables --
4545
// but no other pre-existing region variables -- can name
4646
// the placeholders.
47-
let sub_prime = self.infcx.replace_bound_vars_with_fresh_vars(span, HigherRankedType, sub);
47+
let sub_prime = self.infcx.instantiate_binder_with_fresh_vars(span, HigherRankedType, sub);
4848

4949
debug!("a_prime={:?}", sub_prime);
5050
debug!("b_prime={:?}", sup_prime);
@@ -70,7 +70,7 @@ impl<'tcx> InferCtxt<'tcx> {
7070
///
7171
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/hrtb.html
7272
#[instrument(level = "debug", skip(self), ret)]
73-
pub fn replace_bound_vars_with_placeholders<T>(&self, binder: ty::Binder<'tcx, T>) -> T
73+
pub fn instantiate_binder_with_placeholders<T>(&self, binder: ty::Binder<'tcx, T>) -> T
7474
where
7575
T: TypeFoldable<'tcx> + Copy,
7676
{

compiler/rustc_infer/src/infer/mod.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ impl<'tcx> InferCtxt<'tcx> {
995995

996996
Ok(self.commit_if_ok(|_snapshot| {
997997
let ty::SubtypePredicate { a_is_expected, a, b } =
998-
self.replace_bound_vars_with_placeholders(predicate);
998+
self.instantiate_binder_with_placeholders(predicate);
999999

10001000
let ok = self.at(cause, param_env).sub_exp(a_is_expected, a, b)?;
10011001

@@ -1008,7 +1008,7 @@ impl<'tcx> InferCtxt<'tcx> {
10081008
cause: &traits::ObligationCause<'tcx>,
10091009
predicate: ty::PolyRegionOutlivesPredicate<'tcx>,
10101010
) {
1011-
let ty::OutlivesPredicate(r_a, r_b) = self.replace_bound_vars_with_placeholders(predicate);
1011+
let ty::OutlivesPredicate(r_a, r_b) = self.instantiate_binder_with_placeholders(predicate);
10121012
let origin =
10131013
SubregionOrigin::from_obligation_cause(cause, || RelateRegionParamBound(cause.span));
10141014
self.sub_regions(origin, r_b, r_a); // `b : a` ==> `a <= b`
@@ -1447,7 +1447,14 @@ impl<'tcx> InferCtxt<'tcx> {
14471447
value
14481448
}
14491449

1450-
pub fn replace_bound_vars_with_fresh_vars<T>(
1450+
// Instantiates the bound variables in a given binder with fresh inference
1451+
// variables in the current universe.
1452+
//
1453+
// Use this method if you'd like to find some substitution of the binder's
1454+
// variables (e.g. during a method call). If there isn't a [`LateBoundRegionConversionTime`]
1455+
// that corresponds to your use case, consider whether or not you should
1456+
// use [`InferCtxt::instantiate_binder_with_placeholders`] instead.
1457+
pub fn instantiate_binder_with_fresh_vars<T>(
14511458
&self,
14521459
span: Span,
14531460
lbrct: LateBoundRegionConversionTime,

compiler/rustc_infer/src/infer/sub.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> {
161161
let a_types = infcx.tcx.anonymize_bound_vars(a_types);
162162
let b_types = infcx.tcx.anonymize_bound_vars(b_types);
163163
if a_types.bound_vars() == b_types.bound_vars() {
164-
let (a_types, b_types) = infcx.replace_bound_vars_with_placeholders(
164+
let (a_types, b_types) = infcx.instantiate_binder_with_placeholders(
165165
a_types.map_bound(|a_types| (a_types, b_types.skip_binder())),
166166
);
167167
for (a, b) in std::iter::zip(a_types, b_types) {

compiler/rustc_trait_selection/src/solve/fulfill.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
7474
)
7575
}
7676
ty::PredicateKind::Subtype(pred) => {
77-
let (a, b) = infcx.replace_bound_vars_with_placeholders(
77+
let (a, b) = infcx.instantiate_binder_with_placeholders(
7878
goal.predicate.kind().rebind((pred.a, pred.b)),
7979
);
8080
let expected_found = ExpectedFound::new(true, a, b);
@@ -84,7 +84,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
8484
)
8585
}
8686
ty::PredicateKind::Coerce(pred) => {
87-
let (a, b) = infcx.replace_bound_vars_with_placeholders(
87+
let (a, b) = infcx.instantiate_binder_with_placeholders(
8888
goal.predicate.kind().rebind((pred.a, pred.b)),
8989
);
9090
let expected_found = ExpectedFound::new(false, a, b);
@@ -94,7 +94,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
9494
)
9595
}
9696
ty::PredicateKind::ConstEquate(a, b) => {
97-
let (a, b) = infcx.replace_bound_vars_with_placeholders(
97+
let (a, b) = infcx.instantiate_binder_with_placeholders(
9898
goal.predicate.kind().rebind((a, b)),
9999
);
100100
let expected_found = ExpectedFound::new(true, a, b);

compiler/rustc_trait_selection/src/solve/infcx_ext.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub(super) trait InferCtxtExt<'tcx> {
2626
rhs: T,
2727
) -> Result<Vec<Goal<'tcx, ty::Predicate<'tcx>>>, NoSolution>;
2828

29-
fn instantiate_bound_vars_with_infer<T: TypeFoldable<'tcx> + Copy>(
29+
fn instantiate_binder_with_infer<T: TypeFoldable<'tcx> + Copy>(
3030
&self,
3131
value: ty::Binder<'tcx, T>,
3232
) -> T;
@@ -65,11 +65,11 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
6565
})
6666
}
6767

68-
fn instantiate_bound_vars_with_infer<T: TypeFoldable<'tcx> + Copy>(
68+
fn instantiate_binder_with_infer<T: TypeFoldable<'tcx> + Copy>(
6969
&self,
7070
value: ty::Binder<'tcx, T>,
7171
) -> T {
72-
self.replace_bound_vars_with_fresh_vars(
72+
self.instantiate_binder_with_fresh_vars(
7373
DUMMY_SP,
7474
LateBoundRegionConversionTime::HigherRankedType,
7575
value,

compiler/rustc_trait_selection/src/solve/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
304304
}
305305
}
306306
} else {
307-
let kind = self.infcx.replace_bound_vars_with_placeholders(kind);
307+
let kind = self.infcx.instantiate_binder_with_placeholders(kind);
308308
let goal = goal.with(self.tcx(), ty::Binder::dummy(kind));
309309
let (_, certainty) = self.evaluate_goal(goal)?;
310310
self.make_canonical_response(certainty)

compiler/rustc_trait_selection/src/solve/project_goals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
323323
{
324324
ecx.infcx.probe(|_| {
325325
let assumption_projection_pred =
326-
ecx.infcx.instantiate_bound_vars_with_infer(poly_projection_pred);
326+
ecx.infcx.instantiate_binder_with_infer(poly_projection_pred);
327327
let nested_goals = ecx.infcx.eq(
328328
goal.param_env,
329329
goal.predicate.projection_ty,

compiler/rustc_trait_selection/src/solve/trait_goals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
7272
// FIXME: Constness and polarity
7373
ecx.infcx.probe(|_| {
7474
let assumption_trait_pred =
75-
ecx.infcx.instantiate_bound_vars_with_infer(poly_trait_pred);
75+
ecx.infcx.instantiate_binder_with_infer(poly_trait_pred);
7676
let nested_goals = ecx.infcx.eq(
7777
goal.param_env,
7878
goal.predicate.trait_ref,

compiler/rustc_trait_selection/src/solve/trait_goals/structural_traits.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub(super) fn instantiate_constituent_tys_for_auto_trait<'tcx>(
5454
}
5555

5656
ty::GeneratorWitness(types) => {
57-
Ok(infcx.replace_bound_vars_with_placeholders(types).to_vec())
57+
Ok(infcx.instantiate_binder_with_placeholders(types).to_vec())
5858
}
5959

6060
ty::GeneratorWitnessMIR(..) => todo!(),
@@ -174,7 +174,7 @@ pub(super) fn instantiate_constituent_tys_for_copy_clone_trait<'tcx>(
174174
}
175175

176176
ty::GeneratorWitness(types) => {
177-
Ok(infcx.replace_bound_vars_with_placeholders(types).to_vec())
177+
Ok(infcx.instantiate_binder_with_placeholders(types).to_vec())
178178
}
179179

180180
ty::GeneratorWitnessMIR(..) => todo!(),

compiler/rustc_trait_selection/src/traits/error_reporting/ambiguity.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn recompute_applicable_impls<'tcx>(
2222
let impl_may_apply = |impl_def_id| {
2323
let ocx = ObligationCtxt::new_in_snapshot(infcx);
2424
let placeholder_obligation =
25-
infcx.replace_bound_vars_with_placeholders(obligation.predicate);
25+
infcx.instantiate_binder_with_placeholders(obligation.predicate);
2626
let obligation_trait_ref =
2727
ocx.normalize(&ObligationCause::dummy(), param_env, placeholder_obligation.trait_ref);
2828

@@ -47,11 +47,11 @@ pub fn recompute_applicable_impls<'tcx>(
4747
let param_env_candidate_may_apply = |poly_trait_predicate: ty::PolyTraitPredicate<'tcx>| {
4848
let ocx = ObligationCtxt::new_in_snapshot(infcx);
4949
let placeholder_obligation =
50-
infcx.replace_bound_vars_with_placeholders(obligation.predicate);
50+
infcx.instantiate_binder_with_placeholders(obligation.predicate);
5151
let obligation_trait_ref =
5252
ocx.normalize(&ObligationCause::dummy(), param_env, placeholder_obligation.trait_ref);
5353

54-
let param_env_predicate = infcx.replace_bound_vars_with_fresh_vars(
54+
let param_env_predicate = infcx.instantiate_binder_with_fresh_vars(
5555
DUMMY_SP,
5656
LateBoundRegionConversionTime::HigherRankedType,
5757
poly_trait_predicate,

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
17161716
let (values, err) = if let ty::PredicateKind::Clause(ty::Clause::Projection(data)) =
17171717
bound_predicate.skip_binder()
17181718
{
1719-
let data = self.replace_bound_vars_with_fresh_vars(
1719+
let data = self.instantiate_binder_with_fresh_vars(
17201720
obligation.cause.span,
17211721
infer::LateBoundRegionConversionTime::HigherRankedType,
17221722
bound_predicate.rebind(data),

0 commit comments

Comments
 (0)