about summary refs log tree commit diff
path: root/clippy_lints/src/implicit_hasher.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2023-10-06 17:35:45 +0200
committerPhilipp Krones <hello@philkrones.com>2023-10-06 17:35:45 +0200
commit8ebed4cc1a2e21844c58f3b0bfbad1a069bb09b6 (patch)
tree917baf90e5136e5f6beca54bbc49ff775a1b9877 /clippy_lints/src/implicit_hasher.rs
parent9de3e6c9281e284f81515345330fb74b0c4ad312 (diff)
downloadrust-8ebed4cc1a2e21844c58f3b0bfbad1a069bb09b6.tar.gz
rust-8ebed4cc1a2e21844c58f3b0bfbad1a069bb09b6.zip
Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyup
Diffstat (limited to 'clippy_lints/src/implicit_hasher.rs')
-rw-r--r--clippy_lints/src/implicit_hasher.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/src/implicit_hasher.rs b/clippy_lints/src/implicit_hasher.rs
index 64a4a3fa741..2b2ea156cd4 100644
--- a/clippy_lints/src/implicit_hasher.rs
+++ b/clippy_lints/src/implicit_hasher.rs
@@ -6,9 +6,8 @@ use rustc_hir as hir;
 use rustc_hir::intravisit::{walk_body, walk_expr, walk_inf, walk_ty, Visitor};
 use rustc_hir::{Body, Expr, ExprKind, GenericArg, Item, ItemKind, QPath, TyKind};
 use rustc_hir_analysis::hir_ty_to_ty;
-use rustc_lint::{LateContext, LateLintPass, LintContext};
+use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::hir::nested_filter;
-use rustc_middle::lint::in_external_macro;
 use rustc_middle::ty::{Ty, TypeckResults};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::Span;
@@ -162,7 +161,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
                     vis.visit_ty(ty);
 
                     for target in &vis.found {
-                        if in_external_macro(cx.sess(), generics.span) {
+                        if generics.span.from_expansion() {
                             continue;
                         }
                         let generics_suggestion_span = generics.span.substitute_dummy({