1
Fork 0

Rollup merge of #112060 - lcnr:early-binder, r=jackh726

`EarlyBinder::new` -> `EarlyBinder::bind`

for consistency with `Binder::bind`. it may make sense to also add `EarlyBinder::dummy` in places where we know that no parameters exist, but I left that out of this PR.

r? `@jackh726` `@kylematsuda`
This commit is contained in:
Nilstrieb 2023-05-30 12:57:40 +02:00 committed by GitHub
commit e7fdba84e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 60 additions and 60 deletions

View file

@ -1280,7 +1280,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
// params (and trait ref's late bound params). This logic is very similar to
// `Predicate::subst_supertrait`, and it's no coincidence why.
let shifted_output = tcx.shift_bound_var_indices(num_bound_vars, output);
let subst_output = ty::EarlyBinder::new(shifted_output).subst(tcx, substs);
let subst_output = ty::EarlyBinder::bind(shifted_output).subst(tcx, substs);
let bound_vars = tcx.late_bound_vars(binding.hir_id);
ty::Binder::bind_with_vars(subst_output, bound_vars)