aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 17:02:20 +0100
committerAleksey Kladov <[email protected]>2020-07-30 17:02:20 +0100
commit3cd4112bdc924c132cb0eab9d064511a215421ec (patch)
treef651b475d9c799a772fd37e89405f80a04ea953e /crates/ra_ide_db
parent6b25f640a6ad8e2322b5cc0664223b742459336d (diff)
Finalize const&static grammar
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r--crates/ra_ide_db/src/defs.rs4
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs4
2 files changed, 4 insertions, 4 deletions
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<RootDatabase>, name: &ast::Name) -> Option
166 let def: hir::Trait = sema.to_def(&it)?; 166 let def: hir::Trait = sema.to_def(&it)?;
167 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 167 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
168 }, 168 },
169 ast::StaticDef(it) => { 169 ast::Static(it) => {
170 let def: hir::Static = sema.to_def(&it)?; 170 let def: hir::Static = sema.to_def(&it)?;
171 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 171 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
172 }, 172 },
@@ -178,7 +178,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
178 let def: hir::Function = sema.to_def(&it)?; 178 let def: hir::Function = sema.to_def(&it)?;
179 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 179 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
180 }, 180 },
181 ast::ConstDef(it) => { 181 ast::Const(it) => {
182 let def: hir::Const = sema.to_def(&it)?; 182 let def: hir::Const = sema.to_def(&it)?;
183 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 183 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
184 }, 184 },
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)> {
403 ast::TraitDef(it) => decl(it), 403 ast::TraitDef(it) => decl(it),
404 ast::Module(it) => decl(it), 404 ast::Module(it) => decl(it),
405 ast::TypeAlias(it) => decl(it), 405 ast::TypeAlias(it) => decl(it),
406 ast::ConstDef(it) => decl(it), 406 ast::Const(it) => decl(it),
407 ast::StaticDef(it) => decl(it), 407 ast::Static(it) => decl(it),
408 ast::MacroCall(it) => { 408 ast::MacroCall(it) => {
409 if it.is_macro_rules().is_some() { 409 if it.is_macro_rules().is_some() {
410 decl(it) 410 decl(it)