1
Fork 0

Fix reexports missing from the search index

This commit is contained in:
Guillaume Gomez 2022-05-05 21:56:03 +02:00
parent 12d3f107c1
commit 279dee5374
4 changed files with 29 additions and 3 deletions

View file

@ -248,7 +248,16 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
}
// Index this method for searching later on.
if let Some(ref s) = item.name {
if let Some(ref s) = item.name.or_else(|| {
if item.is_stripped() {
None
} else if let clean::ImportItem(ref i) = *item.kind &&
let clean::ImportKind::Simple(s) = i.kind {
Some(s)
} else {
None
}
}) {
let (parent, is_inherent_impl_item) = match *item.kind {
clean::StrippedItem(..) => ((None, None), false),
clean::AssocConstItem(..) | clean::AssocTypeItem(..)