diff --git a/src/librustdoc/passes.rs b/src/librustdoc/passes.rs index a08776946bc..429b4590261 100644 --- a/src/librustdoc/passes.rs +++ b/src/librustdoc/passes.rs @@ -128,18 +128,12 @@ impl<'a> fold::DocFolder for Stripper<'a> { } } - clean::ViewItemItem(..) => { + clean::ViewItemItem(..) | clean::StructFieldItem(..) => { if i.visibility != Some(ast::Public) { return None } } - clean::StructFieldItem(..) => { - if i.visibility == Some(ast::Private) { - return None; - } - } - // handled below clean::ModuleItem(..) => {}