about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/internal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/internal.rs')
-rw-r--r--compiler/rustc_lint/src/internal.rs19
1 files changed, 4 insertions, 15 deletions
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs
index 0398d4a9961..9b1a339572e 100644
--- a/compiler/rustc_lint/src/internal.rs
+++ b/compiler/rustc_lint/src/internal.rs
@@ -248,21 +248,10 @@ impl EarlyLintPass for LintPassImpl {
                 if last.ident.name == sym::LintPass {
                     let expn_data = lint_pass.path.span.ctxt().outer_expn_data();
                     let call_site = expn_data.call_site;
-                    if !matches!(
-                        expn_data.kind,
-                        ExpnKind::Macro {
-                            kind: MacroKind::Bang,
-                            name: sym::impl_lint_pass,
-                            proc_macro: _
-                        }
-                    ) && !matches!(
-                        call_site.ctxt().outer_expn_data().kind,
-                        ExpnKind::Macro {
-                            kind: MacroKind::Bang,
-                            name: sym::declare_lint_pass,
-                            proc_macro: _
-                        }
-                    ) {
+                    if expn_data.kind != ExpnKind::Macro(MacroKind::Bang, sym::impl_lint_pass)
+                        && call_site.ctxt().outer_expn_data().kind
+                            != ExpnKind::Macro(MacroKind::Bang, sym::declare_lint_pass)
+                    {
                         cx.struct_span_lint(
                             LINT_PASS_IMPL_WITHOUT_MACRO,
                             lint_pass.path.span,