should_implement_trait - filter on explicit lifetime param only

This commit is contained in:
Tim Nielens 2020-06-23 21:27:48 +02:00
parent e6b2254f9e
commit 7cc1a2ed87

View file

@ -1501,7 +1501,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
!impl_item.generics.params.iter()
.any(|p| matches!(
p.kind,
hir::GenericParamKind::Lifetime { .. }))
hir::GenericParamKind::Lifetime { kind: hir::LifetimeParamKind::Explicit }))
};
if name == method_name &&
sig.decl.inputs.len() == n_args &&