cleanup legacy_numeric_constants

Removes an unnecessary use of `span_lint_hir_and_then()` where
`span_lint_and_then()` would do.
This commit is contained in:
Dan Johnson 2025-07-10 10:44:11 -07:00
parent ae6416aa86
commit 88ee494b38

View file

@ -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",