diff options
author | Aleksey Kladov <[email protected]> | 2018-11-07 15:42:30 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-11-07 15:42:36 +0000 |
commit | 22949dab267bf7b8b3da73fe7745a12daca21a52 (patch) | |
tree | 7a55032e56163968e68f2aaff28c8f4aef477422 /crates/ra_analysis/src/completion.rs | |
parent | 2ed1514df3f8837ccebdbbfdadbe89e79b4a4365 (diff) |
rename module source
Diffstat (limited to 'crates/ra_analysis/src/completion.rs')
-rw-r--r-- | crates/ra_analysis/src/completion.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/completion.rs b/crates/ra_analysis/src/completion.rs index ea15f239c..6fd30aaee 100644 --- a/crates/ra_analysis/src/completion.rs +++ b/crates/ra_analysis/src/completion.rs | |||
@@ -34,10 +34,11 @@ pub(crate) fn resolve_based_completion( | |||
34 | let source_root_id = db.file_source_root(position.file_id); | 34 | let source_root_id = db.file_source_root(position.file_id); |
35 | let file = db.file_syntax(position.file_id); | 35 | let file = db.file_syntax(position.file_id); |
36 | let module_tree = db.module_tree(source_root_id)?; | 36 | let module_tree = db.module_tree(source_root_id)?; |
37 | let module_id = match module_tree.any_module_for_source(ModuleSource::File(position.file_id)) { | 37 | let module_id = |
38 | None => return Ok(None), | 38 | match module_tree.any_module_for_source(ModuleSource::SourceFile(position.file_id)) { |
39 | Some(it) => it, | 39 | None => return Ok(None), |
40 | }; | 40 | Some(it) => it, |
41 | }; | ||
41 | let file = { | 42 | let file = { |
42 | let edit = AtomEdit::insert(position.offset, "intellijRulezz".to_string()); | 43 | let edit = AtomEdit::insert(position.offset, "intellijRulezz".to_string()); |
43 | file.reparse(&edit) | 44 | file.reparse(&edit) |