From c83467796b6c7365ea4f41900d74444384a9e618 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:17:28 +0200 Subject: Finalize Trait grammar --- 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') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index b908bd741..df56f2d9e 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -162,7 +162,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option let def: hir::Enum = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::TraitDef(it) => { + ast::Trait(it) => { let def: hir::Trait = 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 41b8d07f4..35a2c5be3 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 | TRAIT_DEF | TYPE_ALIAS) + matches!(kind, STRUCT | ENUM | TRAIT | TYPE_ALIAS) } /// The actual data that is stored in the index. It should be as compact as @@ -400,7 +400,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { ast::Fn(it) => decl(it), ast::Struct(it) => decl(it), ast::Enum(it) => decl(it), - ast::TraitDef(it) => decl(it), + ast::Trait(it) => decl(it), ast::Module(it) => decl(it), ast::TypeAlias(it) => decl(it), ast::Const(it) => decl(it), -- cgit v1.2.3