diff options
| author | bors <bors@rust-lang.org> | 2025-07-13 22:39:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-13 22:39:10 +0000 |
| commit | 9c3064e131f4939cc95a29bb11413c49bbda1491 (patch) | |
| tree | 8320ff7f32aa67eec55081c56987eb517095cb49 /src/librustdoc/clean/mod.rs | |
| parent | e9182f195b8505c87c4bd055b9f6e114ccda0981 (diff) | |
| parent | 27127e342d28ebeb0734916ada6979b6938fb532 (diff) | |
| download | rust-9c3064e131f4939cc95a29bb11413c49bbda1491.tar.gz rust-9c3064e131f4939cc95a29bb11413c49bbda1491.zip | |
Auto merge of #143357 - cjgillot:no-assoc-item-kind, r=compiler-errors
Retire hir::*ItemRef. This information was kept for various places that iterate on HIR to know about trait-items and impl-items. This PR replaces them by uses of the `associated_items` query that contain pretty much the same information. This shortens many spans to just `def_span`, which can be easier to read.
Diffstat (limited to 'src/librustdoc/clean/mod.rs')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index e6f7aef02c0..e7a1f4d8397 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2867,7 +2867,7 @@ fn clean_maybe_renamed_item<'tcx>( ItemKind::Trait(_, _, _, generics, bounds, item_ids) => { let items = item_ids .iter() - .map(|ti| clean_trait_item(cx.tcx.hir_trait_item(ti.id), cx)) + .map(|&ti| clean_trait_item(cx.tcx.hir_trait_item(ti), cx)) .collect(); TraitItem(Box::new(Trait { @@ -2910,7 +2910,7 @@ fn clean_impl<'tcx>( let items = impl_ .items .iter() - .map(|ii| clean_impl_item(tcx.hir_impl_item(ii.id), cx)) + .map(|&ii| clean_impl_item(tcx.hir_impl_item(ii), cx)) .collect::<Vec<_>>(); // If this impl block is an implementation of the Deref trait, then we |
