From b8ed1c5745ab2fe80b216b00cd68def6d2a2aae9 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 12 Sep 2022 13:50:18 +1000 Subject: [PATCH] Remove unused argument from `check_mac_def`. --- compiler/rustc_lint/src/builtin.rs | 2 +- compiler/rustc_lint/src/early.rs | 2 +- compiler/rustc_lint/src/passes.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index c96e900a974..0ff2ef5cda3 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2000,7 +2000,7 @@ impl KeywordIdents { } impl EarlyLintPass for KeywordIdents { - fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac_def: &ast::MacroDef, _id: ast::NodeId) { + fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac_def: &ast::MacroDef) { self.check_tokens(cx, mac_def.body.inner_tokens()); } fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) { diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 46afc36d996..96ecd79a69c 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -276,7 +276,7 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T> } fn visit_mac_def(&mut self, mac: &'a ast::MacroDef, id: ast::NodeId) { - run_early_pass!(self, check_mac_def, mac, id); + run_early_pass!(self, check_mac_def, mac); self.check_id(id); } diff --git a/compiler/rustc_lint/src/passes.rs b/compiler/rustc_lint/src/passes.rs index 57732741a33..1c6a057d1a8 100644 --- a/compiler/rustc_lint/src/passes.rs +++ b/compiler/rustc_lint/src/passes.rs @@ -162,7 +162,7 @@ macro_rules! early_lint_methods { fn check_impl_item(a: &ast::AssocItem); fn check_variant(a: &ast::Variant); fn check_attribute(a: &ast::Attribute); - fn check_mac_def(a: &ast::MacroDef, b: ast::NodeId); + fn check_mac_def(a: &ast::MacroDef); fn check_mac(a: &ast::MacCall); /// Called when entering a syntax node that can have lint attributes such