about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/implied_bounds.rs
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2025-07-24 09:32:58 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2025-08-11 17:05:42 -0500
commitbf266dc8341755f0f7ac6de1cfa474875f79b3d9 (patch)
tree2fa05402418496736771768baa7dfa8fa86e396a /compiler/rustc_ty_utils/src/implied_bounds.rs
parent5bc23ce25548d7f4a9f6ceaa48cc3d8fe7629f58 (diff)
downloadrust-bf266dc8341755f0f7ac6de1cfa474875f79b3d9.tar.gz
rust-bf266dc8341755f0f7ac6de1cfa474875f79b3d9.zip
Propagate TraitImplHeader to hir
Diffstat (limited to 'compiler/rustc_ty_utils/src/implied_bounds.rs')
-rw-r--r--compiler/rustc_ty_utils/src/implied_bounds.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs
index 6fa763f18ef..cdfb93c4e7d 100644
--- a/compiler/rustc_ty_utils/src/implied_bounds.rs
+++ b/compiler/rustc_ty_utils/src/implied_bounds.rs
@@ -172,10 +172,12 @@ fn impl_spans(tcx: TyCtxt<'_>, def_id: LocalDefId) -> impl Iterator<Item = Span>
         let trait_args = impl_
             .of_trait
             .into_iter()
-            .flat_map(|trait_ref| trait_ref.path.segments.last().unwrap().args().args)
+            .flat_map(|of_trait| of_trait.trait_ref.path.segments.last().unwrap().args().args)
             .map(|arg| arg.span());
-        let dummy_spans_for_default_args =
-            impl_.of_trait.into_iter().flat_map(|trait_ref| iter::repeat(trait_ref.path.span));
+        let dummy_spans_for_default_args = impl_
+            .of_trait
+            .into_iter()
+            .flat_map(|of_trait| iter::repeat(of_trait.trait_ref.path.span));
         iter::once(impl_.self_ty.span).chain(trait_args).chain(dummy_spans_for_default_args)
     } else {
         bug!("unexpected item for impl {def_id:?}: {item:?}")