From 88ee494b385d17e12aa60f2dae307b643ebcf314 Mon Sep 17 00:00:00 2001 From: Dan Johnson Date: Thu, 10 Jul 2025 10:44:11 -0700 Subject: [PATCH] cleanup legacy_numeric_constants Removes an unnecessary use of `span_lint_hir_and_then()` where `span_lint_and_then()` would do. --- clippy_lints/src/legacy_numeric_constants.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/legacy_numeric_constants.rs b/clippy_lints/src/legacy_numeric_constants.rs index 6a81db73edf0..0768d037a738 100644 --- a/clippy_lints/src/legacy_numeric_constants.rs +++ b/clippy_lints/src/legacy_numeric_constants.rs @@ -1,5 +1,5 @@ use clippy_config::Conf; -use clippy_utils::diagnostics::{span_lint_and_then, span_lint_hir_and_then}; +use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::msrvs::{self, Msrv}; use clippy_utils::{get_parent_expr, is_from_proc_macro}; use hir::def_id::DefId; @@ -143,7 +143,7 @@ impl<'tcx> LateLintPass<'tcx> for LegacyNumericConstants { && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) && !is_from_proc_macro(cx, expr) { - span_lint_hir_and_then(cx, LEGACY_NUMERIC_CONSTANTS, expr.hir_id, span, msg, |diag| { + span_lint_and_then(cx, LEGACY_NUMERIC_CONSTANTS, span, msg, |diag| { diag.span_suggestion_verbose( span, "use the associated constant instead",