make various enums "inherit" from AdtDef

This commit is contained in:
Aleksey Kladov 2019-09-13 00:10:16 +03:00
parent d8b621cf26
commit 45117c6388
17 changed files with 156 additions and 121 deletions

View file

@ -107,9 +107,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
Some(AssocItem(hir::ImplItem::TypeAlias(_))) => "type",
Some(Def(hir::ModuleDef::Module(_))) => "module",
Some(Def(hir::ModuleDef::Function(_))) => "function",
Some(Def(hir::ModuleDef::Struct(_))) => "type",
Some(Def(hir::ModuleDef::Union(_))) => "type",
Some(Def(hir::ModuleDef::Enum(_))) => "type",
Some(Def(hir::ModuleDef::AdtDef(_))) => "type",
Some(Def(hir::ModuleDef::EnumVariant(_))) => "constant",
Some(Def(hir::ModuleDef::Const(_))) => "constant",
Some(Def(hir::ModuleDef::Static(_))) => "constant",