Skip to content

Commit

Permalink
auto merge of #12879 : Aatch/rust/rustdoc-mod-privacy, r=alexcrichton
Browse files Browse the repository at this point in the history
Modules don't actually inherit privacy, so anything other than Public should be considered private.

Fixes #12801

cc @cmr
  • Loading branch information
bors committed Mar 19, 2014
2 parents 61d5bc5 + 7180b5d commit 7532d20
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/librustdoc/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) {
Expand Down

0 comments on commit 7532d20

Please sign in to comment.