Skip to content

Commit 5eba3f6

Browse files
committed
rustdoc: hide reference methods in search index
1 parent 9a7cc6c commit 5eba3f6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/librustdoc/formats/cache.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
287287
} else {
288288
let last = self.cache.parent_stack.last().expect("parent_stack is empty 2");
289289
let did = match &*last {
290+
ParentStackItem::Impl {
291+
for_: clean::Type::BorrowedRef { type_, .. },
292+
..
293+
} => type_.def_id(&self.cache),
290294
ParentStackItem::Impl { for_, .. } => for_.def_id(&self.cache),
291295
ParentStackItem::Type(item_id) => item_id.as_def_id(),
292296
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// exact-check
2+
3+
const QUERY = 'reference::shrink';
4+
5+
const EXPECTED = {
6+
// avoid including the method that's not going to be in the HTML
7+
'others': [],
8+
};

0 commit comments

Comments
 (0)