From 31d275e5877d983fecb39bbaad837f6b7cf120d3 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 28 Sep 2020 00:18:09 +0200 Subject: Correctly handle "pub use" reexports --- src/librustdoc/html/render/mod.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index afd1dc59642..a74e768f980 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2074,12 +2074,14 @@ fn item_module(w: &mut Buffer, cx: &Context, item: &clean::Item, items: &[clean: } clean::ImportItem(ref import) => { - write!( - w, - "{}{}", - myitem.visibility.print_with_space(), - import.print() - ); + if import.should_be_displayed() { + write!( + w, + "{}{}", + myitem.visibility.print_with_space(), + import.print() + ); + } } _ => { -- cgit 1.4.1-3-g733a5