aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-14 10:14:54 +0000
committerAleksey Kladov <[email protected]>2019-03-17 09:52:52 +0000
commitb2a6c1736295a5fffa5ac0d0fee835cdc719ada3 (patch)
tree56fd27197126f11011fe9030cd9bfb80e142e709 /crates/ra_ide_api/src
parentc7259a899c1709753dcda0fb117e2f7cc30a4d6e (diff)
remove lower module
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/change.rs2
-rw-r--r--crates/ra_ide_api/src/symbol_index.rs11
2 files changed, 4 insertions, 9 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs
index 0c90ed5b5..26fde91bc 100644
--- a/crates/ra_ide_api/src/change.rs
+++ b/crates/ra_ide_api/src/change.rs
@@ -223,7 +223,7 @@ impl RootDatabase {
223 self.query(hir::db::FileItemsQuery).sweep(sweep); 223 self.query(hir::db::FileItemsQuery).sweep(sweep);
224 self.query(hir::db::FileItemQuery).sweep(sweep); 224 self.query(hir::db::FileItemQuery).sweep(sweep);
225 225
226 self.query(hir::db::LowerModuleWithSourceMapQuery).sweep(sweep); 226 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep);
227 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); 227 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep);
228 } 228 }
229} 229}
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs
index 94fe1d6d7..23c743bef 100644
--- a/crates/ra_ide_api/src/symbol_index.rs
+++ b/crates/ra_ide_api/src/symbol_index.rs
@@ -30,7 +30,7 @@ use std::{
30use fst::{self, Streamer}; 30use fst::{self, Streamer};
31use ra_syntax::{ 31use ra_syntax::{
32 SyntaxNode, SyntaxNodePtr, SourceFile, SmolStr, TreeArc, AstNode, 32 SyntaxNode, SyntaxNodePtr, SourceFile, SmolStr, TreeArc, AstNode,
33 algo::{visit::{visitor, Visitor}, find_covering_node}, 33 algo::{visit::{visitor, Visitor}},
34 SyntaxKind::{self, *}, 34 SyntaxKind::{self, *},
35 ast::{self, NameOwner}, 35 ast::{self, NameOwner},
36 WalkEvent, 36 WalkEvent,
@@ -66,14 +66,9 @@ fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex>
66 db.check_canceled(); 66 db.check_canceled();
67 let source_file = db.parse(file_id); 67 let source_file = db.parse(file_id);
68 68
69 let mut symbols = source_file_to_file_symbols(&source_file, file_id); 69 let symbols = source_file_to_file_symbols(&source_file, file_id);
70 70
71 for (name, text_range) in hir::source_binder::macro_symbols(db, file_id) { 71 // TODO: add macros here
72 let node = find_covering_node(source_file.syntax(), text_range);
73 let ptr = SyntaxNodePtr::new(node);
74 // TODO: Should we get container name for macro symbols?
75 symbols.push(FileSymbol { file_id, name, ptr, name_range: None, container_name: None })
76 }
77 72
78 Arc::new(SymbolIndex::new(symbols)) 73 Arc::new(SymbolIndex::new(symbols))
79} 74}