Rustdoc: Properly strip private modules

A private module will survive the strip-private pass if it contains
trait implementations, which aren't stripped until a separate pass in
render.
This commit is contained in:
Steven Fackler 2013-11-01 23:32:58 -07:00
parent c15038db08
commit ea9432ef00

View File

@ -622,6 +622,11 @@ impl DocFolder for Cache {
}
None
}
// Private modules may survive the strip-private pass if
// they contain impls for public types, but those will get
// stripped here
clean::Item { inner: clean::ModuleItem(ref m), _ }
if m.items.len() == 0 => None,
i => Some(i),
}
}