Skip to content

Commit 7180b5d

Browse files
committed
Modules are either public, or private, so private modules should be stripped out
1 parent 9e89ffc commit 7180b5d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustdoc/passes.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ impl<'a> fold::DocFolder for Stripper<'a> {
128128
}
129129
}
130130

131-
clean::ViewItemItem(..) => {
131+
clean::ViewItemItem(..) |
132+
clean::ModuleItem(..) => {
132133
if i.visibility != Some(ast::Public) {
133134
return None
134135
}
@@ -140,9 +141,6 @@ impl<'a> fold::DocFolder for Stripper<'a> {
140141
}
141142
}
142143

143-
// handled below
144-
clean::ModuleItem(..) => {}
145-
146144
// trait impls for private items should be stripped
147145
clean::ImplItem(clean::Impl{ for_: clean::ResolvedPath{ id: ref for_id, .. }, .. }) => {
148146
if !self.exported_items.contains(for_id) {

0 commit comments

Comments
 (0)