mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: rewrite code_action generate_delegate_trait
This commit is contained in:
parent
19387d3077
commit
59aa791fe6
8 changed files with 983 additions and 158 deletions
|
@ -572,6 +572,16 @@ impl ast::Item {
|
|||
}
|
||||
}
|
||||
|
||||
impl ast::Type {
|
||||
pub fn generic_arg_list(&self) -> Option<ast::GenericArgList> {
|
||||
if let ast::Type::PathType(path_type) = self {
|
||||
path_type.path()?.segment()?.generic_arg_list()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum FieldKind {
|
||||
Name(ast::NameRef),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue