Skip to content

Commit 22dfdc9

Browse files
committed
auto merge of #10233 : sfackler/rust/private-module, r=alexcrichton
A private module will survive the strip-private pass if it contains trait implementations, which aren't stripped until a separate pass in render.
2 parents 95b1833 + ea9432e commit 22dfdc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustdoc/html/render.rs

+5
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,11 @@ impl DocFolder for Cache {
622622
}
623623
None
624624
}
625+
// Private modules may survive the strip-private pass if
626+
// they contain impls for public types, but those will get
627+
// stripped here
628+
clean::Item { inner: clean::ModuleItem(ref m), _ }
629+
if m.items.len() == 0 => None,
625630
i => Some(i),
626631
}
627632
}

0 commit comments

Comments
 (0)