diff options
author | Aleksey Kladov <[email protected]> | 2019-03-14 10:14:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-17 09:52:52 +0000 |
commit | b2a6c1736295a5fffa5ac0d0fee835cdc719ada3 (patch) | |
tree | 56fd27197126f11011fe9030cd9bfb80e142e709 /crates/ra_ide_api | |
parent | c7259a899c1709753dcda0fb117e2f7cc30a4d6e (diff) |
remove lower module
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 11 | ||||
-rw-r--r-- | crates/ra_ide_api/tests/test/snapshots/test__unresolved_module_diagnostic.snap | 2 |
3 files changed, 5 insertions, 10 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::{ | |||
30 | use fst::{self, Streamer}; | 30 | use fst::{self, Streamer}; |
31 | use ra_syntax::{ | 31 | use 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 | } |
diff --git a/crates/ra_ide_api/tests/test/snapshots/test__unresolved_module_diagnostic.snap b/crates/ra_ide_api/tests/test/snapshots/test__unresolved_module_diagnostic.snap index d258820af..5bb953892 100644 --- a/crates/ra_ide_api/tests/test/snapshots/test__unresolved_module_diagnostic.snap +++ b/crates/ra_ide_api/tests/test/snapshots/test__unresolved_module_diagnostic.snap | |||
@@ -7,7 +7,7 @@ source: "crates\\ra_ide_api\\tests\\test\\main.rs" | |||
7 | [ | 7 | [ |
8 | Diagnostic { | 8 | Diagnostic { |
9 | message: "unresolved module", | 9 | message: "unresolved module", |
10 | range: [4; 7), | 10 | range: [0; 8), |
11 | fix: Some( | 11 | fix: Some( |
12 | SourceChange { | 12 | SourceChange { |
13 | label: "create module", | 13 | label: "create module", |