mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril
Handle trait alias definitions Part of #2773 This PR adds a bunch of structs and enum variants for trait aliases. Trait aliases should be handled as an independent item because they are semantically distinct from traits. I basically started by adding `TraitAlias{Id, Loc}` to `hir_def::item_tree` and iterated adding necessary stuffs until compiler stopped complaining what's missing. Let me know if there's still anything I need to add. I'm opening up this PR for early review and stuff. I'm planning to add tests for IDE functionalities in this PR, but not type-related support, for which I put FIXME notes.
This commit is contained in:
commit
6756294aa0
63 changed files with 623 additions and 206 deletions
|
@ -191,6 +191,7 @@ pub enum SymbolKind {
|
|||
Struct,
|
||||
ToolModule,
|
||||
Trait,
|
||||
TraitAlias,
|
||||
TypeAlias,
|
||||
TypeParam,
|
||||
Union,
|
||||
|
@ -221,6 +222,7 @@ impl From<FileSymbolKind> for SymbolKind {
|
|||
FileSymbolKind::Static => SymbolKind::Static,
|
||||
FileSymbolKind::Struct => SymbolKind::Struct,
|
||||
FileSymbolKind::Trait => SymbolKind::Trait,
|
||||
FileSymbolKind::TraitAlias => SymbolKind::TraitAlias,
|
||||
FileSymbolKind::TypeAlias => SymbolKind::TypeAlias,
|
||||
FileSymbolKind::Union => SymbolKind::Union,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue