From 3cd4112bdc924c132cb0eab9d064511a215421ec Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:02:20 +0200 Subject: Finalize const&static grammar --- crates/ra_ide_db/src/defs.rs | 4 ++-- crates/ra_ide_db/src/symbol_index.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 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 635cf706c..b908bd741 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -166,7 +166,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option let def: hir::Trait = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::StaticDef(it) => { + ast::Static(it) => { let def: hir::Static = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, @@ -178,7 +178,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option let def: hir::Function = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::ConstDef(it) => { + ast::Const(it) => { let def: hir::Const = 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 646d338ae..41b8d07f4 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -403,8 +403,8 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { ast::TraitDef(it) => decl(it), ast::Module(it) => decl(it), ast::TypeAlias(it) => decl(it), - ast::ConstDef(it) => decl(it), - ast::StaticDef(it) => decl(it), + ast::Const(it) => decl(it), + ast::Static(it) => decl(it), ast::MacroCall(it) => { if it.is_macro_rules().is_some() { decl(it) -- cgit v1.2.3