Skip to content

Commit 6f1a78f

Browse files
committed
Use Span#from_expansion instead of in_external_macro
1 parent 0e43a04 commit 6f1a78f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/implicit_hasher.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ use rustc_hir as hir;
66
use rustc_hir::intravisit::{walk_body, walk_expr, walk_inf, walk_ty, Visitor};
77
use rustc_hir::{Body, Expr, ExprKind, GenericArg, Item, ItemKind, QPath, TyKind};
88
use rustc_hir_analysis::hir_ty_to_ty;
9-
use rustc_lint::{LateContext, LateLintPass, LintContext};
9+
use rustc_lint::{LateContext, LateLintPass};
1010
use rustc_middle::hir::nested_filter;
11-
use rustc_middle::lint::in_external_macro;
1211
use rustc_middle::ty::{Ty, TypeckResults};
1312
use rustc_session::{declare_lint_pass, declare_tool_lint};
1413
use rustc_span::source_map::Span;
@@ -162,7 +161,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
162161
vis.visit_ty(ty);
163162

164163
for target in &vis.found {
165-
if in_external_macro(cx.sess(), generics.span) {
164+
if generics.span.from_expansion() {
166165
continue;
167166
}
168167
let generics_suggestion_span = generics.span.substitute_dummy({

0 commit comments

Comments
 (0)