Skip to content

Commit 9cdf491

Browse files
committed
hack: ignore list-stems for pub lint
1 parent 4c7ce7c commit 9cdf491

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/librustc_lint/builtin.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,15 @@ impl UnreachablePub {
11361136

11371137
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnreachablePub {
11381138
fn check_item(&mut self, cx: &LateContext, item: &hir::Item) {
1139-
self.perform_lint(cx, "item", item.id, &item.vis, item.span, true);
1139+
match item.node {
1140+
hir::ItemKind::Use(_, hir::UseKind::ListStem) => {
1141+
// Hack: ignore these `use foo::{}` remnants which are just a figment
1142+
// our IR.
1143+
}
1144+
_ => {
1145+
self.perform_lint(cx, "item", item.id, &item.vis, item.span, true);
1146+
}
1147+
}
11401148
}
11411149

11421150
fn check_foreign_item(&mut self, cx: &LateContext, foreign_item: &hir::ForeignItem) {

0 commit comments

Comments
 (0)