@@ -9,15 +9,14 @@ use rustc_hir::{
9
9
ItemKind , Lifetime , LifetimeName , ParamName , QPath , TraitBoundModifier , TraitFn , TraitItem , TraitItemKind , Ty ,
10
10
TyKind , WhereClause , WherePredicate ,
11
11
} ;
12
- use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
12
+ use rustc_lint:: { LateContext , LateLintPass } ;
13
13
use rustc_middle:: hir:: map:: Map ;
14
- use rustc_middle:: lint:: in_external_macro;
15
14
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
16
15
use rustc_span:: source_map:: Span ;
17
16
use rustc_span:: symbol:: kw;
18
17
19
18
use crate :: reexport:: Name ;
20
- use crate :: utils:: { last_path_segment, span_lint, trait_ref_of_method} ;
19
+ use crate :: utils:: { in_macro , last_path_segment, span_lint, trait_ref_of_method} ;
21
20
22
21
declare_clippy_lint ! {
23
22
/// **What it does:** Checks for lifetime annotations which can be removed by
@@ -125,7 +124,7 @@ fn check_fn_inner<'a, 'tcx>(
125
124
span : Span ,
126
125
report_extra_lifetimes : bool ,
127
126
) {
128
- if in_external_macro ( cx . sess ( ) , span) || has_where_lifetimes ( cx, & generics. where_clause ) {
127
+ if in_macro ( span) || has_where_lifetimes ( cx, & generics. where_clause ) {
129
128
return ;
130
129
}
131
130
0 commit comments