about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-05-15 16:10:17 -0700
committerEric Huss <eric@huss.org>2021-05-15 16:13:46 -0700
commit5bbc240ffbb0dcf510fd73d71dae529bd345e6b2 (patch)
tree8cefde9b70c34b541f4ef195cab232777e26da88 /compiler/rustc_lint/src
parent17f30e5451f581d753899d2f628e5be354df33cd (diff)
downloadrust-5bbc240ffbb0dcf510fd73d71dae529bd345e6b2.tar.gz
rust-5bbc240ffbb0dcf510fd73d71dae529bd345e6b2.zip
Fix unused attributes on macro_rules.
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/late.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs
index d325b5fe7f8..0a7ab4a2baf 100644
--- a/compiler/rustc_lint/src/late.rs
+++ b/compiler/rustc_lint/src/late.rs
@@ -448,6 +448,10 @@ fn late_lint_pass_crate<'tcx, T: LateLintPass<'tcx>>(tcx: TyCtxt<'tcx>, pass: T)
         lint_callback!(cx, check_crate, krate);
 
         hir_visit::walk_crate(cx, krate);
+        for attr in krate.non_exported_macro_attrs {
+            // This HIR ID is a lie, since the macro ID isn't available.
+            cx.visit_attribute(hir::CRATE_HIR_ID, attr);
+        }
 
         lint_callback!(cx, check_crate_post, krate);
     })