aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-22 14:50:42 +0000
committerGitHub <[email protected]>2020-03-22 14:50:42 +0000
commit9328aba70619ef5d1d849e51587567a0ab7aec1d (patch)
tree94fd49ee8f9a05828396b0d5a7402fac71e990c2 /crates/ra_ide_db
parent39adefc4a7a7d4de0c8b81d174619110a9399d9b (diff)
parentbb22a4e386c13a17b518a3822d343f6dd3dc4398 (diff)
Merge #3677
3677: Add support for macro in symbol_index r=kjeremy a=edwin0cheng This PR allows macro showing up in `Open symbol` search: ![show_macro](https://user-images.githubusercontent.com/11014119/77244297-548d0b80-6c4e-11ea-8613-15926cc297b3.png) Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs
index 884359ee3..0f46f93c1 100644
--- a/crates/ra_ide_db/src/symbol_index.rs
+++ b/crates/ra_ide_db/src/symbol_index.rs
@@ -362,6 +362,13 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> {
362 ast::TypeAliasDef(it) => { decl(it) }, 362 ast::TypeAliasDef(it) => { decl(it) },
363 ast::ConstDef(it) => { decl(it) }, 363 ast::ConstDef(it) => { decl(it) },
364 ast::StaticDef(it) => { decl(it) }, 364 ast::StaticDef(it) => { decl(it) },
365 ast::MacroCall(it) => {
366 if it.is_macro_rules().is_some() {
367 decl(it)
368 } else {
369 None
370 }
371 },
365 _ => None, 372 _ => None,
366 } 373 }
367 } 374 }