Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/node_ext.rs')
| -rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index 333ee35d63..e1d4addb52 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs @@ -764,6 +764,15 @@ impl ast::Meta { } } +impl ast::GenericArgList { + pub fn lifetime_args(&self) -> impl Iterator<Item = ast::LifetimeArg> { + self.generic_args().filter_map(|arg| match arg { + ast::GenericArg::LifetimeArg(it) => Some(it), + _ => None, + }) + } +} + impl ast::GenericParamList { pub fn lifetime_params(&self) -> impl Iterator<Item = ast::LifetimeParam> { self.generic_params().filter_map(|param| match param { |