Refactor a bit to prepare for resolving trait assoc items

This commit is contained in:
Florian Diebold 2019-09-14 16:26:03 +02:00
parent 913ab1ec0a
commit 828d60574f
10 changed files with 85 additions and 54 deletions

View file

@ -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",