cleanup some skip_binder -> subst_identity

This commit is contained in:
Kyle Matsuda 2023-06-02 11:07:28 -06:00
parent e6d4725c76
commit 57cbe25006
3 changed files with 5 additions and 5 deletions

View File

@ -586,7 +586,7 @@ impl<'tcx> Instance<'tcx> {
if let Some(substs) = self.substs_for_mir_body() { if let Some(substs) = self.substs_for_mir_body() {
v.subst(tcx, substs) v.subst(tcx, substs)
} else { } else {
v.skip_binder() v.subst_identity()
} }
} }

View File

@ -647,7 +647,7 @@ fn build_call_shim<'tcx>(
let mut sig = if let Some(sig_substs) = sig_substs { let mut sig = if let Some(sig_substs) = sig_substs {
sig.subst(tcx, &sig_substs) sig.subst(tcx, &sig_substs)
} else { } else {
sig.skip_binder() sig.subst_identity()
}; };
if let CallKind::Indirect(fnty) = call_kind { if let CallKind::Indirect(fnty) = call_kind {

View File

@ -104,10 +104,10 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
// the post-inference `trait_ref`, as it's more accurate. // the post-inference `trait_ref`, as it's more accurate.
trait_: Some(clean_trait_ref_with_bindings( trait_: Some(clean_trait_ref_with_bindings(
cx, cx,
ty::Binder::dummy(trait_ref.skip_binder()), ty::Binder::dummy(trait_ref.subst_identity()),
ThinVec::new(), ThinVec::new(),
)), )),
for_: clean_middle_ty(ty::Binder::dummy(ty.skip_binder()), cx, None), for_: clean_middle_ty(ty::Binder::dummy(ty.subst_identity()), cx, None),
items: cx items: cx
.tcx .tcx
.associated_items(impl_def_id) .associated_items(impl_def_id)
@ -116,7 +116,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
.collect::<Vec<_>>(), .collect::<Vec<_>>(),
polarity: ty::ImplPolarity::Positive, polarity: ty::ImplPolarity::Positive,
kind: ImplKind::Blanket(Box::new(clean_middle_ty( kind: ImplKind::Blanket(Box::new(clean_middle_ty(
ty::Binder::dummy(trait_ref.skip_binder().self_ty()), ty::Binder::dummy(trait_ref.subst_identity().self_ty()),
cx, cx,
None, None,
))), ))),