diff options
| author | Yoshitomo Nakanishi <yurayura.rounin.3@gmail.com> | 2024-03-05 20:19:05 +0100 |
|---|---|---|
| committer | Yoshitomo Nakanishi <yurayura.rounin.3@gmail.com> | 2024-03-07 13:56:29 +0100 |
| commit | 96699347989d1e6fc43805dd374f8289cbb8fcad (patch) | |
| tree | 7dbf2330079ca3a34fd76bf33ee61174dc4841fa /compiler/rustc_ty_utils/src | |
| parent | 8c9a75b3238b66592779d6b240dbf78eacefebb8 (diff) | |
| download | rust-96699347989d1e6fc43805dd374f8289cbb8fcad.tar.gz rust-96699347989d1e6fc43805dd374f8289cbb8fcad.zip | |
Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/ty.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index 48d9a5e27b7..2b6b91672c3 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -255,10 +255,9 @@ fn issue33140_self_ty(tcx: TyCtxt<'_>, def_id: DefId) -> Option<EarlyBinder<Ty<' let impl_ = tcx .impl_trait_header(def_id) - .unwrap_or_else(|| bug!("issue33140_self_ty called on inherent impl {:?}", def_id)) - .skip_binder(); + .unwrap_or_else(|| bug!("issue33140_self_ty called on inherent impl {:?}", def_id)); - let trait_ref = impl_.trait_ref; + let trait_ref = impl_.trait_ref.skip_binder(); debug!("issue33140_self_ty({:?}), trait-ref={:?}", def_id, trait_ref); let is_marker_like = impl_.polarity == ty::ImplPolarity::Positive |
