about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-23 06:20:02 +0000
committerbors <bors@rust-lang.org>2015-12-23 06:20:02 +0000
commit38201501dfe193bfa14d792f590effd462a78717 (patch)
tree3dcb4d4af0b6d0e0c03c299dcebbe1f90c333931
parent45e52dadb8548dcbe8da91fe624dd991b4994e70 (diff)
parent05780ace49087881b5fba88b78f781a5083b1ab0 (diff)
downloadrust-38201501dfe193bfa14d792f590effd462a78717.tar.gz
rust-38201501dfe193bfa14d792f590effd462a78717.zip
Auto merge of #30504 - mitaa:rdoc_root, r=alexcrichton
fixes #30327
-rw-r--r--src/librustdoc/html/render.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 09a2a1b1c02..b9ebe977b7b 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1058,14 +1058,16 @@ impl DocFolder for Cache {
                         }
                     });
 
-                    self.search_index.push(IndexItem {
-                        ty: shortty(&item),
-                        name: s.to_string(),
-                        path: path.join("::").to_string(),
-                        desc: shorter(item.doc_value()),
-                        parent: parent,
-                        search_type: get_index_search_type(&item, parent_basename),
-                    });
+                    if item.def_id.index != CRATE_DEF_INDEX {
+                        self.search_index.push(IndexItem {
+                            ty: shortty(&item),
+                            name: s.to_string(),
+                            path: path.join("::").to_string(),
+                            desc: shorter(item.doc_value()),
+                            parent: parent,
+                            search_type: get_index_search_type(&item, parent_basename),
+                        });
+                    }
                 }
                 (Some(parent), None) if is_method || (!self.privmod && !hidden_field)=> {
                     if parent.is_local() {