Merge #11690
11690: feat: Add an assist for inlining type aliases r=Veykril a=steven-joruk I'm working towards implementing #10881, but I'd like to get this in first with earlier feedback. Is `inline_type_alias` a good enough name? I guess the follow up assist would be called `inline_type_alias_into_all_users` based on that.   Co-authored-by: Steven Joruk <steven@joruk.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user