about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/macro_use.rs5
-rw-r--r--tests/ui/crashes/ice-14303.rs12
2 files changed, 12 insertions, 5 deletions
diff --git a/clippy_lints/src/macro_use.rs b/clippy_lints/src/macro_use.rs
index bb6e22d9e5c..68dc1903a24 100644
--- a/clippy_lints/src/macro_use.rs
+++ b/clippy_lints/src/macro_use.rs
@@ -117,11 +117,6 @@ impl LateLintPass<'_> for MacroUseImports {
             self.push_unique_macro_pat_ty(cx, item.span);
         }
     }
-    fn check_attribute(&mut self, cx: &LateContext<'_>, attr: &hir::Attribute) {
-        if attr.span.from_expansion() {
-            self.push_unique_macro(cx, attr.span);
-        }
-    }
     fn check_expr(&mut self, cx: &LateContext<'_>, expr: &hir::Expr<'_>) {
         if expr.span.from_expansion() {
             self.push_unique_macro(cx, expr.span);
diff --git a/tests/ui/crashes/ice-14303.rs b/tests/ui/crashes/ice-14303.rs
new file mode 100644
index 00000000000..e81f29cd7af
--- /dev/null
+++ b/tests/ui/crashes/ice-14303.rs
@@ -0,0 +1,12 @@
+//@check-pass
+#![warn(clippy::macro_use_imports)]
+
+#[repr(transparent)]
+pub struct X(());
+
+#[repr(u8)]
+pub enum Action {
+    Off = 0,
+}
+
+fn main() {}