diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-06 12:00:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-06 12:00:34 +0200 |
| commit | 7c76f3b9d8e9b0419c4cb3d7b90043531ff7be42 (patch) | |
| tree | fab5c73ab0823bc1d98cfbf9ac427f19c8daed3d | |
| parent | 71a72ee34a8a456c632c71dea53372cb343f495e (diff) | |
| parent | 57cbe250069e7c8eca6bf1e89c6a6b37c71b790d (diff) | |
| download | rust-7c76f3b9d8e9b0419c4cb3d7b90043531ff7be42.tar.gz rust-7c76f3b9d8e9b0419c4cb3d7b90043531ff7be42.zip | |
Rollup merge of #112220 - kylematsuda:earlybinder-fix, r=compiler-errors
Cleanup some `EarlyBinder::skip_binder()` -> `EarlyBinder::subst_identity()` fix some incorrect `skip_binder()`'s as identified in https://github.com/rust-lang/rust/pull/112006#pullrequestreview-1448369203 r? ``@compiler-errors`` ``@lcnr`` ``@jackh726`` (hope it's alright to just tag everyone who commented :sweat_smile:)
| -rw-r--r-- | compiler/rustc_middle/src/ty/instance.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/shim.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/clean/blanket_impl.rs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs index e641d1ef1be..c0d591430f7 100644 --- a/compiler/rustc_middle/src/ty/instance.rs +++ b/compiler/rustc_middle/src/ty/instance.rs @@ -586,7 +586,7 @@ impl<'tcx> Instance<'tcx> { if let Some(substs) = self.substs_for_mir_body() { v.subst(tcx, substs) } else { - v.skip_binder() + v.subst_identity() } } diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs index ae726dea944..5f12f1937c0 100644 --- a/compiler/rustc_mir_transform/src/shim.rs +++ b/compiler/rustc_mir_transform/src/shim.rs @@ -647,7 +647,7 @@ fn build_call_shim<'tcx>( let mut sig = if let Some(sig_substs) = sig_substs { sig.subst(tcx, &sig_substs) } else { - sig.skip_binder() + sig.subst_identity() }; if let CallKind::Indirect(fnty) = call_kind { diff --git a/src/librustdoc/clean/blanket_impl.rs b/src/librustdoc/clean/blanket_impl.rs index 83887cc44b9..9183fdaa087 100644 --- a/src/librustdoc/clean/blanket_impl.rs +++ b/src/librustdoc/clean/blanket_impl.rs @@ -104,10 +104,10 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> { // the post-inference `trait_ref`, as it's more accurate. trait_: Some(clean_trait_ref_with_bindings( cx, - ty::Binder::dummy(trait_ref.skip_binder()), + ty::Binder::dummy(trait_ref.subst_identity()), 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 .tcx .associated_items(impl_def_id) @@ -116,7 +116,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> { .collect::<Vec<_>>(), polarity: ty::ImplPolarity::Positive, 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, None, ))), |
