We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33e8663 commit 18e7f3bCopy full SHA for 18e7f3b
src/librustdoc/passes.rs
@@ -136,7 +136,9 @@ impl<'a> fold::DocFolder for Stripper<'a> {
136
Some(i) => {
137
match i.inner {
138
// emptied modules/impls have no need to exist
139
- clean::ModuleItem(ref m) if m.items.len() == 0 => None,
+ clean::ModuleItem(ref m)
140
+ if m.items.len() == 0 &&
141
+ i.doc_value().is_none() => None,
142
clean::ImplItem(ref i) if i.methods.len() == 0 => None,
143
_ => {
144
self.retained.insert(i.id);
0 commit comments