mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Refactor a bit to prepare for resolving trait assoc items
This commit is contained in:
parent
913ab1ec0a
commit
828d60574f
10 changed files with 85 additions and 54 deletions
|
@ -102,9 +102,9 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
|
|||
Some(Method(_)) => "function",
|
||||
Some(Macro(_)) => "macro",
|
||||
Some(FieldAccess(_)) => "field",
|
||||
Some(AssocItem(hir::ImplItem::Method(_))) => "function",
|
||||
Some(AssocItem(hir::ImplItem::Const(_))) => "constant",
|
||||
Some(AssocItem(hir::ImplItem::TypeAlias(_))) => "type",
|
||||
Some(AssocItem(hir::AssocItem::Function(_))) => "function",
|
||||
Some(AssocItem(hir::AssocItem::Const(_))) => "constant",
|
||||
Some(AssocItem(hir::AssocItem::TypeAlias(_))) => "type",
|
||||
Some(Def(hir::ModuleDef::Module(_))) => "module",
|
||||
Some(Def(hir::ModuleDef::Function(_))) => "function",
|
||||
Some(Def(hir::ModuleDef::Adt(_))) => "type",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue