Fix extra_unused_lifetimes false positive

This commit is contained in:
Samuel E. Moelius III 2022-06-21 05:18:27 -04:00
parent f9fea1737e
commit 87eded6500

View file

@ -92,9 +92,11 @@ 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 {
if !item.span.from_expansion() {
report_extra_impl_lifetimes(cx, impl_);
}
}
}
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) {
if let ImplItemKind::Fn(ref sig, id) = item.kind {