mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
Don't hide anonymous re-exports but never inline them
This commit is contained in:
@@ -223,6 +223,11 @@ fn maybe_inline_local(
|
||||
) -> 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 @@ fn visit_item_inner(
|
||||
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) => {
|
||||
|
||||
Reference in New Issue
Block a user