Skip to content

Commit 26f711a

Browse files
nikomatsakispietroalbini
authored andcommitted
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.
1 parent ff003e1 commit 26f711a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/librustc/hir/lowering.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,12 +3137,8 @@ impl<'a> LoweringContext<'a> {
31373137
});
31383138
}
31393139

3140-
// Privatize the degenerate import base, used only to check
3141-
// the stability of `use a::{};`, to avoid it showing up as
3142-
// a re-export by accident when `pub`, e.g. in documentation.
31433140
let def = self.expect_full_def_from_use(id).next().unwrap_or(Def::Err);
31443141
let path = P(self.lower_path_extra(def, &prefix, ParamMode::Explicit, None));
3145-
*vis = respan(prefix.span.shrink_to_lo(), hir::VisibilityKind::Inherited);
31463142
hir::ItemKind::Use(path, hir::UseKind::ListStem)
31473143
}
31483144
}

0 commit comments

Comments
 (0)