Don't hide anonymous re-exports but never inline them
This commit is contained in:
parent
7c306f6dcd
commit
e8bd4ef1e5
1 changed files with 7 additions and 2 deletions
|
|
@ -223,6 +223,11 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
) -> bool {
|
||||
debug!("maybe_inline_local res: {:?}", res);
|
||||
|
||||
if renamed == Some(kw::Underscore) {
|
||||
// We never inline `_` reexports.
|
||||
return false;
|
||||
}
|
||||
|
||||
if self.cx.output_format.is_json() {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -329,8 +334,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
self.visit_foreign_item_inner(item, None);
|
||||
}
|
||||
}
|
||||
// If we're inlining, skip private items or item reexported as "_".
|
||||
_ if self.inlining && (!is_pub || renamed == Some(kw::Underscore)) => {}
|
||||
// If we're inlining, skip private items.
|
||||
_ if self.inlining && !is_pub => {}
|
||||
hir::ItemKind::GlobalAsm(..) => {}
|
||||
hir::ItemKind::Use(_, hir::UseKind::ListStem) => {}
|
||||
hir::ItemKind::Use(path, kind) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue