Skip to content

Commit e8bd4ef

Browse files
Don't hide anonymous re-exports but never inline them
1 parent 7c306f6 commit e8bd4ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/librustdoc/visit_ast.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
223223
) -> bool {
224224
debug!("maybe_inline_local res: {:?}", res);
225225

226+
if renamed == Some(kw::Underscore) {
227+
// We never inline `_` reexports.
228+
return false;
229+
}
230+
226231
if self.cx.output_format.is_json() {
227232
return false;
228233
}
@@ -329,8 +334,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
329334
self.visit_foreign_item_inner(item, None);
330335
}
331336
}
332-
// If we're inlining, skip private items or item reexported as "_".
333-
_ if self.inlining && (!is_pub || renamed == Some(kw::Underscore)) => {}
337+
// If we're inlining, skip private items.
338+
_ if self.inlining && !is_pub => {}
334339
hir::ItemKind::GlobalAsm(..) => {}
335340
hir::ItemKind::Use(_, hir::UseKind::ListStem) => {}
336341
hir::ItemKind::Use(path, kind) => {

0 commit comments

Comments
 (0)