Skip to content

Commit 4687eeb

Browse files
committed
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 a0a4790 commit 4687eeb

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
@@ -3139,12 +3139,8 @@ impl<'a> LoweringContext<'a> {
31393139
});
31403140
}
31413141

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

0 commit comments

Comments
 (0)