Skip to content

Commit

Permalink
auto merge of #16016 : tomjakubowski/rust/rustdoc-fix-15490, r=alexcr…
Browse files Browse the repository at this point in the history
…ichton

Previously, private and `#[doc(hidden)]` struct fields appeared in the
search index despite being hidden from the struct's documentation.

Fix #15490
  • Loading branch information
bors committed Jul 27, 2014
2 parents ad4fa46 + c05cfab commit e0d10bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustdoc/html/render.rs
Expand Up @@ -845,8 +845,12 @@ impl DocFolder for Cache {
}
_ => (None, Some(self.stack.as_slice()))
};
let hidden_field = match item.inner {
clean::StructFieldItem(clean::HiddenStructField) => true,
_ => false
};
match parent {
(parent, Some(path)) if !self.privmod => {
(parent, Some(path)) if !self.privmod && !hidden_field => {
self.search_index.push(IndexItem {
ty: shortty(&item),
name: s.to_string(),
Expand Down

0 comments on commit e0d10bb

Please sign in to comment.