Replace EarlyBinder(x) with EarlyBinder::new(x)

This commit is contained in:
Kyle Matsuda 2023-05-26 11:19:35 -06:00
parent 39c03fb652
commit 03534ac8b7
46 changed files with 63 additions and 59 deletions

View file

@ -69,7 +69,7 @@ fn make_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceDef<'tcx>) -> Body<'
// of this function. Is this intentional?
if let Some(ty::Generator(gen_def_id, substs, _)) = ty.map(Ty::kind) {
let body = tcx.optimized_mir(*gen_def_id).generator_drop().unwrap();
let body = EarlyBinder(body.clone()).subst(tcx, substs);
let body = EarlyBinder::new(body.clone()).subst(tcx, substs);
debug!("make_shim({:?}) = {:?}", instance, body);
return body;
}