about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-11-21 15:34:11 -0500
committerNiko Matsakis <niko@alum.mit.edu>2018-11-21 15:34:11 -0500
commit4687eebc287e6f715b237dbb15f6c734715b474a (patch)
tree6d0a26c37cc2544f66f042ba9d6a7368a5722726
parenta0a47904d64031a7a24828d6ad368ea9da33082a (diff)
downloadrust-4687eebc287e6f715b237dbb15f6c734715b474a.tar.gz
rust-4687eebc287e6f715b237dbb15f6c734715b474a.zip
preserve the original visibility for the "list stem" node
Without this, the `vis` does not wind up in the tree anywhere, and
then we get ICEs because the node-ids it refers to are not present.
The motivation seemed to be documentation, but `ListStem` HIR nodes
are ignored in rustdoc, from what I can tell.
-rw-r--r--src/librustc/hir/lowering.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index 79d605c0035..eec9d084d7e 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -3139,12 +3139,8 @@ impl<'a> LoweringContext<'a> {
                     });
                 }
 
-                // Privatize the degenerate import base, used only to check
-                // the stability of `use a::{};`, to avoid it showing up as
-                // a re-export by accident when `pub`, e.g. in documentation.
                 let def = self.expect_full_def_from_use(id).next().unwrap_or(Def::Err);
                 let path = P(self.lower_path_extra(def, &prefix, ParamMode::Explicit, None));
-                *vis = respan(prefix.span.shrink_to_lo(), hir::VisibilityKind::Inherited);
                 hir::ItemKind::Use(path, hir::UseKind::ListStem)
             }
         }