Add bound_fn_sig
This commit is contained in:
parent
c92248ab9f
commit
6c05e8d009
16 changed files with 59 additions and 36 deletions
|
@ -8,7 +8,7 @@ use rustc_middle::mir::visit::*;
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::traits::ObligationCause;
|
||||
use rustc_middle::ty::subst::Subst;
|
||||
use rustc_middle::ty::{self, ConstKind, EarlyBinder, Instance, InstanceDef, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{self, ConstKind, Instance, InstanceDef, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_span::{hygiene::ExpnKind, ExpnData, LocalExpnId, Span};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
|
@ -260,7 +260,7 @@ impl<'tcx> Inliner<'tcx> {
|
|||
return None;
|
||||
}
|
||||
|
||||
let fn_sig = EarlyBinder(self.tcx.fn_sig(def_id)).subst(self.tcx, substs);
|
||||
let fn_sig = self.tcx.bound_fn_sig(def_id).subst(self.tcx, substs);
|
||||
|
||||
return Some(CallSite {
|
||||
callee,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue