Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted rustdoc fixes #11461

Merged
merged 5 commits into from
Jan 11, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rustdoc: Don't strip empty modules with documentation
Closes #11443
  • Loading branch information
alexcrichton committed Jan 10, 2014
commit 18e7f3b3ecac7c41c8c0a5188100b8d17b25b7c2
4 changes: 3 additions & 1 deletion src/librustdoc/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ impl<'a> fold::DocFolder for Stripper<'a> {
Some(i) => {
match i.inner {
// emptied modules/impls have no need to exist
clean::ModuleItem(ref m) if m.items.len() == 0 => None,
clean::ModuleItem(ref m)
if m.items.len() == 0 &&
i.doc_value().is_none() => None,
clean::ImplItem(ref i) if i.methods.len() == 0 => None,
_ => {
self.retained.insert(i.id);
Expand Down