change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata
This commit is contained in:
parent
e982971ff2
commit
c2414dfaa4
80 changed files with 142 additions and 152 deletions
|
@ -152,7 +152,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 = tcx.bound_fn_sig(def_id).subst(tcx, substs);
|
||||
let sig = tcx.fn_sig(def_id).subst(tcx, substs);
|
||||
let sig = tcx.erase_late_bound_regions(sig);
|
||||
let span = tcx.def_span(def_id);
|
||||
|
||||
|
@ -363,7 +363,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
|
|||
// we must subst the self_ty because it's
|
||||
// otherwise going to be TySelf and we can't index
|
||||
// or access fields of a Place of type TySelf.
|
||||
let sig = tcx.bound_fn_sig(def_id).subst(tcx, &[self_ty.into()]);
|
||||
let sig = tcx.fn_sig(def_id).subst(tcx, &[self_ty.into()]);
|
||||
let sig = tcx.erase_late_bound_regions(sig);
|
||||
let span = tcx.def_span(def_id);
|
||||
|
||||
|
@ -606,7 +606,7 @@ fn build_call_shim<'tcx>(
|
|||
};
|
||||
|
||||
let def_id = instance.def_id();
|
||||
let sig = tcx.bound_fn_sig(def_id);
|
||||
let sig = tcx.fn_sig(def_id);
|
||||
let sig = sig.map_bound(|sig| tcx.erase_late_bound_regions(sig));
|
||||
|
||||
assert_eq!(sig_substs.is_some(), !instance.has_polymorphic_mir_body());
|
||||
|
@ -799,7 +799,7 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> {
|
|||
|
||||
// Normalize the sig.
|
||||
let sig = tcx
|
||||
.bound_fn_sig(ctor_id)
|
||||
.fn_sig(ctor_id)
|
||||
.subst_identity()
|
||||
.no_bound_vars()
|
||||
.expect("LBR in ADT constructor signature");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue