From 609680ef97dbf82c07b6b06e21aa366423892304 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:52:53 +0200 Subject: Rename EnumDef -> Enum --- crates/ra_ide_db/src/defs.rs | 2 +- crates/ra_ide_db/src/symbol_index.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_db/src') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 6a2180f6c..586b3d750 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -158,7 +158,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option let def: hir::Union = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::EnumDef(it) => { + ast::Enum(it) => { let def: hir::Enum = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index da19f0f33..646d338ae 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -344,7 +344,7 @@ impl Query { } fn is_type(kind: SyntaxKind) -> bool { - matches!(kind, STRUCT | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS) + matches!(kind, STRUCT | ENUM | TRAIT_DEF | TYPE_ALIAS) } /// The actual data that is stored in the index. It should be as compact as @@ -399,7 +399,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { match node { ast::Fn(it) => decl(it), ast::Struct(it) => decl(it), - ast::EnumDef(it) => decl(it), + ast::Enum(it) => decl(it), ast::TraitDef(it) => decl(it), ast::Module(it) => decl(it), ast::TypeAlias(it) => decl(it), -- cgit v1.2.3