Skip to content

Commit 88ee494

Browse files
committed
cleanup legacy_numeric_constants
Removes an unnecessary use of `span_lint_hir_and_then()` where `span_lint_and_then()` would do.
1 parent ae6416a commit 88ee494

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/legacy_numeric_constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clippy_config::Conf;
2-
use clippy_utils::diagnostics::{span_lint_and_then, span_lint_hir_and_then};
2+
use clippy_utils::diagnostics::span_lint_and_then;
33
use clippy_utils::msrvs::{self, Msrv};
44
use clippy_utils::{get_parent_expr, is_from_proc_macro};
55
use hir::def_id::DefId;
@@ -143,7 +143,7 @@ impl<'tcx> LateLintPass<'tcx> for LegacyNumericConstants {
143143
&& self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS)
144144
&& !is_from_proc_macro(cx, expr)
145145
{
146-
span_lint_hir_and_then(cx, LEGACY_NUMERIC_CONSTANTS, expr.hir_id, span, msg, |diag| {
146+
span_lint_and_then(cx, LEGACY_NUMERIC_CONSTANTS, span, msg, |diag| {
147147
diag.span_suggestion_verbose(
148148
span,
149149
"use the associated constant instead",

0 commit comments

Comments
 (0)