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
|
@ -215,7 +215,7 @@ pub(super) fn poly_project_and_unify_type<'cx, 'tcx>(
|
|||
let r = infcx.commit_if_ok(|_snapshot| {
|
||||
let old_universe = infcx.universe();
|
||||
let placeholder_predicate =
|
||||
infcx.replace_bound_vars_with_placeholders(obligation.predicate);
|
||||
infcx.instantiate_binder_with_placeholders(obligation.predicate);
|
||||
let new_universe = infcx.universe();
|
||||
|
||||
let placeholder_obligation = obligation.with(infcx.tcx, placeholder_predicate);
|
||||
|
@ -2046,7 +2046,7 @@ fn confirm_param_env_candidate<'cx, 'tcx>(
|
|||
let cause = &obligation.cause;
|
||||
let param_env = obligation.param_env;
|
||||
|
||||
let cache_entry = infcx.replace_bound_vars_with_fresh_vars(
|
||||
let cache_entry = infcx.instantiate_binder_with_fresh_vars(
|
||||
cause.span,
|
||||
LateBoundRegionConversionTime::HigherRankedType,
|
||||
poly_cache_entry,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue