Add bound_fn_sig

This commit is contained in:
Jack Huey 2022-05-08 15:43:18 -04:00
parent c92248ab9f
commit 6c05e8d009
16 changed files with 59 additions and 36 deletions

View file

@ -151,7 +151,7 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
} else {
InternalSubsts::identity_for_item(tcx, def_id)
};
let sig = EarlyBinder(tcx.fn_sig(def_id)).subst(tcx, substs);
let sig = tcx.bound_fn_sig(def_id).subst(tcx, substs);
let sig = tcx.erase_late_bound_regions(sig);
let span = tcx.def_span(def_id);
@ -343,7 +343,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
// otherwise going to be TySelf and we can't index
// or access fields of a Place of type TySelf.
let substs = tcx.mk_substs_trait(self_ty, &[]);
let sig = EarlyBinder(tcx.fn_sig(def_id)).subst(tcx, substs);
let sig = tcx.bound_fn_sig(def_id).subst(tcx, substs);
let sig = tcx.erase_late_bound_regions(sig);
let span = tcx.def_span(def_id);