mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
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:
commit
b594f9c441
4 changed files with 791 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue