Skip to content

Commit 87eded6

Browse files
committed
Fix extra_unused_lifetimes false positive
1 parent f9fea17 commit 87eded6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/lifetimes.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ impl<'tcx> LateLintPass<'tcx> for Lifetimes {
9292
if let ItemKind::Fn(ref sig, generics, id) = item.kind {
9393
check_fn_inner(cx, sig.decl, Some(id), None, generics, item.span, true);
9494
} else if let ItemKind::Impl(impl_) = item.kind {
95-
report_extra_impl_lifetimes(cx, impl_);
95+
if !item.span.from_expansion() {
96+
report_extra_impl_lifetimes(cx, impl_);
97+
}
9698
}
9799
}
98100

0 commit comments

Comments
 (0)