Skip to content

Commit

Permalink
preserve the original visibility for the "list stem" node
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nikomatsakis committed Nov 21, 2018
1 parent a0a4790 commit 4687eeb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/librustc/hir/lowering.rs
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4687eeb

Please sign in to comment.