mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
feat: Add an assist for inlining type aliases
This intends to lead to a more useful assist to replace all users of an alias with its definition.
This commit is contained in:
parent
cdeb1b2c78
commit
5b712bd821
4 changed files with 746 additions and 0 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