From 22949dab267bf7b8b3da73fe7745a12daca21a52 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 7 Nov 2018 18:42:30 +0300 Subject: rename module source --- crates/ra_analysis/src/completion.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crates/ra_analysis/src/completion.rs') 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( let source_root_id = db.file_source_root(position.file_id); let file = db.file_syntax(position.file_id); let module_tree = db.module_tree(source_root_id)?; - let module_id = match module_tree.any_module_for_source(ModuleSource::File(position.file_id)) { - None => return Ok(None), - Some(it) => it, - }; + let module_id = + match module_tree.any_module_for_source(ModuleSource::SourceFile(position.file_id)) { + None => return Ok(None), + Some(it) => it, + }; let file = { let edit = AtomEdit::insert(position.offset, "intellijRulezz".to_string()); file.reparse(&edit) -- cgit v1.2.3