Open
Description
See https://github.com/rust-lang/rust-clippy/pull/3786/files , we have a lot of code that does something like params.args.iter().filter_map(|arg| match arg { GenericArg::Lifetime(lt) => Some(lt), _ => None }
We should probably have a helper function that returns an iterator for these, placed in utils
. Probably something like:
fn types_of_generics(generics: &Generics) -> impl Iterator<Type> {...}
fn lifetimes_of_generics(generics: &Generics) -> impl Iterator<Lifetime> {...}