about summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-10-03 08:43:43 +0000
committerbors <bors@rust-lang.org>2025-10-03 08:43:43 +0000
commitdd091003ace19d9556c647d87f7a9cd1e8dcc17e (patch)
treee664b8e4a5837e0f2245f51c41765da6fce596cf /src/librustdoc/html/render/mod.rs
parent3b8665c5ab3aeced9b01672404c3764583e722ca (diff)
parentc7d6857f750a8c957ebca81340faa379cc3d110f (diff)
downloadrust-dd091003ace19d9556c647d87f7a9cd1e8dcc17e.tar.gz
rust-dd091003ace19d9556c647d87f7a9cd1e8dcc17e.zip
Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items

fixes rust-lang/rust#138251

cc `@notriddle`
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
-rw-r--r--src/librustdoc/html/render/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index d6371e4dbab..84d684e0c95 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -134,6 +134,8 @@ pub(crate) struct IndexItem {
     pub(crate) desc: String,
     pub(crate) parent: Option<DefId>,
     pub(crate) parent_idx: Option<usize>,
+    pub(crate) trait_parent: Option<DefId>,
+    pub(crate) trait_parent_idx: Option<usize>,
     pub(crate) exact_module_path: Option<Vec<Symbol>>,
     pub(crate) impl_id: Option<DefId>,
     pub(crate) search_type: Option<IndexItemFunctionType>,