diff options
| author | Samuel E. Moelius III <sam@moeli.us> | 2022-06-21 05:18:27 -0400 |
|---|---|---|
| committer | Samuel E. Moelius III <sam@moeli.us> | 2022-06-22 20:21:04 -0400 |
| commit | 87eded6500f1d1185ac7d0a951fe3aaac3d4dff4 (patch) | |
| tree | 821c8074331bb0a5f69fa7475919012397be4ab5 | |
| parent | f9fea1737e34da3afedf4a0d35ea4866ce7f87a1 (diff) | |
| download | rust-87eded6500f1d1185ac7d0a951fe3aaac3d4dff4.tar.gz rust-87eded6500f1d1185ac7d0a951fe3aaac3d4dff4.zip | |
Fix `extra_unused_lifetimes` false positive
| -rw-r--r-- | clippy_lints/src/lifetimes.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index 93f5663312f..5c0bd57ac50 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -92,7 +92,9 @@ impl<'tcx> LateLintPass<'tcx> for Lifetimes { if let ItemKind::Fn(ref sig, generics, id) = item.kind { check_fn_inner(cx, sig.decl, Some(id), None, generics, item.span, true); } else if let ItemKind::Impl(impl_) = item.kind { - report_extra_impl_lifetimes(cx, impl_); + if !item.span.from_expansion() { + report_extra_impl_lifetimes(cx, impl_); + } } } |
