aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db')
-rw-r--r--crates/ide_db/src/defs.rs2
-rw-r--r--crates/ide_db/src/symbol_index.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs
index ab23dd7ac..0d9808d24 100644
--- a/crates/ide_db/src/defs.rs
+++ b/crates/ide_db/src/defs.rs
@@ -227,7 +227,7 @@ impl NameClass {
227 let def: hir::TypeAlias = sema.to_def(&it)?; 227 let def: hir::TypeAlias = sema.to_def(&it)?;
228 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 228 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
229 }, 229 },
230 ast::MacroRules(it) => { 230 ast::Macro(it) => {
231 let def = sema.to_def(&it)?; 231 let def = sema.to_def(&it)?;
232 Some(NameClass::Definition(Definition::Macro(def))) 232 Some(NameClass::Definition(Definition::Macro(def)))
233 }, 233 },
diff --git a/crates/ide_db/src/symbol_index.rs b/crates/ide_db/src/symbol_index.rs
index 35e382b5c..da427d686 100644
--- a/crates/ide_db/src/symbol_index.rs
+++ b/crates/ide_db/src/symbol_index.rs
@@ -438,7 +438,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> {
438 ast::TypeAlias(it) => decl(it), 438 ast::TypeAlias(it) => decl(it),
439 ast::Const(it) => decl(it), 439 ast::Const(it) => decl(it),
440 ast::Static(it) => decl(it), 440 ast::Static(it) => decl(it),
441 ast::MacroRules(it) => decl(it), 441 ast::Macro(it) => decl(it),
442 ast::Union(it) => decl(it), 442 ast::Union(it) => decl(it),
443 _ => None, 443 _ => None,
444 } 444 }
@@ -458,6 +458,7 @@ fn to_file_symbol(node: &SyntaxNode, file_id: FileId) -> Option<FileSymbol> {
458 CONST => FileSymbolKind::Const, 458 CONST => FileSymbolKind::Const,
459 STATIC => FileSymbolKind::Static, 459 STATIC => FileSymbolKind::Static,
460 MACRO_RULES => FileSymbolKind::Macro, 460 MACRO_RULES => FileSymbolKind::Macro,
461 MACRO_DEF => FileSymbolKind::Macro,
461 UNION => FileSymbolKind::Union, 462 UNION => FileSymbolKind::Union,
462 kind => unreachable!("{:?}", kind), 463 kind => unreachable!("{:?}", kind),
463 }, 464 },