diff options
| author | Dan Johnson <ComputerDruid@gmail.com> | 2025-07-10 10:44:11 -0700 |
|---|---|---|
| committer | Dan Johnson <ComputerDruid@gmail.com> | 2025-07-10 12:01:03 -0700 |
| commit | 88ee494b385d17e12aa60f2dae307b643ebcf314 (patch) | |
| tree | 372eebeffbc8ce131a21acc222bf4051a8dc3bb9 | |
| parent | ae6416aa866d455fb636934bf0911095e2c8cdea (diff) | |
| download | rust-88ee494b385d17e12aa60f2dae307b643ebcf314.tar.gz rust-88ee494b385d17e12aa60f2dae307b643ebcf314.zip | |
cleanup legacy_numeric_constants
Removes an unnecessary use of `span_lint_hir_and_then()` where `span_lint_and_then()` would do.
| -rw-r--r-- | clippy_lints/src/legacy_numeric_constants.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/legacy_numeric_constants.rs b/clippy_lints/src/legacy_numeric_constants.rs index 6a81db73edf..0768d037a73 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", |
