auto merge of #12879 : Aatch/rust/rustdoc-mod-privacy, r=alexcrichton

Modules don't actually inherit privacy, so anything other than Public should be considered private.

Fixes #12801

cc @cmr
This commit is contained in:
bors 2014-03-19 10:11:54 -07:00
commit 7532d20a17

View File

@ -128,7 +128,8 @@ impl<'a> fold::DocFolder for Stripper<'a> {
}
}
clean::ViewItemItem(..) => {
clean::ViewItemItem(..) |
clean::ModuleItem(..) => {
if i.visibility != Some(ast::Public) {
return None
}
@ -140,9 +141,6 @@ impl<'a> fold::DocFolder for Stripper<'a> {
}
}
// handled below
clean::ModuleItem(..) => {}
// trait impls for private items should be stripped
clean::ImplItem(clean::Impl{ for_: clean::ResolvedPath{ id: ref for_id, .. }, .. }) => {
if !self.exported_items.contains(for_id) {