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

@ -858,7 +858,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
} else {
tcx.arena.alloc_from_iter(lazy.decode((self, tcx)))
};
ty::EarlyBinder::new(&*output)
ty::EarlyBinder::bind(&*output)
}
fn get_variant(

View file

@ -1730,7 +1730,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
ty::Closure(_, substs) => {
let constness = self.tcx.constness(def_id.to_def_id());
self.tables.constness.set_some(def_id.to_def_id().index, constness);
record!(self.tables.fn_sig[def_id.to_def_id()] <- ty::EarlyBinder::new(substs.as_closure().sig()));
record!(self.tables.fn_sig[def_id.to_def_id()] <- ty::EarlyBinder::bind(substs.as_closure().sig()));
}
_ => bug!("closure that is neither generator nor closure"),