diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-11-21 16:09:17 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-11-21 16:09:17 -0500 |
| commit | 9cdf4911db1b143f0e40913793389c72e4fa6b17 (patch) | |
| tree | efe984dfcb52c471eb9eff5d86fb139e1b660a54 | |
| parent | 4c7ce7c8973ff8f4b9427faffff3ceda8a1ab7f2 (diff) | |
hack: ignore list-stems for pub lint
| -rw-r--r-- | src/librustc_lint/builtin.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 7dd1ca3493e..0348ba1f1af 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -1136,7 +1136,15 @@ impl UnreachablePub { impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnreachablePub { fn check_item(&mut self, cx: &LateContext, item: &hir::Item) { - self.perform_lint(cx, "item", item.id, &item.vis, item.span, true); + match item.node { + hir::ItemKind::Use(_, hir::UseKind::ListStem) => { + // Hack: ignore these `use foo::{}` remnants which are just a figment + // our IR. + } + _ => { + self.perform_lint(cx, "item", item.id, &item.vis, item.span, true); + } + } } fn check_foreign_item(&mut self, cx: &LateContext, foreign_item: &hir::ForeignItem) { |
