@@ -9,15 +9,14 @@ use rustc_hir::{
99 ItemKind , Lifetime , LifetimeName , ParamName , QPath , TraitBoundModifier , TraitFn , TraitItem , TraitItemKind , Ty ,
1010 TyKind , WhereClause , WherePredicate ,
1111} ;
12- use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
12+ use rustc_lint:: { LateContext , LateLintPass } ;
1313use rustc_middle:: hir:: map:: Map ;
14- use rustc_middle:: lint:: in_external_macro;
1514use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
1615use rustc_span:: source_map:: Span ;
1716use rustc_span:: symbol:: kw;
1817
1918use 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} ;
2120
2221declare_clippy_lint ! {
2322 /// **What it does:** Checks for lifetime annotations which can be removed by
@@ -125,7 +124,7 @@ fn check_fn_inner<'a, 'tcx>(
125124 span : Span ,
126125 report_extra_lifetimes : bool ,
127126) {
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 ) {
129128 return ;
130129 }
131130
0 commit comments