aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/completion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/completion.rs')
-rw-r--r--crates/ra_analysis/src/completion.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion.rs b/crates/ra_analysis/src/completion.rs
index 6667c06e7..766df1d96 100644
--- a/crates/ra_analysis/src/completion.rs
+++ b/crates/ra_analysis/src/completion.rs
@@ -11,7 +11,7 @@ use rustc_hash::{FxHashMap, FxHashSet};
11use crate::{ 11use crate::{
12 db::{self, SyntaxDatabase}, 12 db::{self, SyntaxDatabase},
13 descriptors::function::FnScopes, 13 descriptors::function::FnScopes,
14 descriptors::module::{ModuleId, ModuleScope, ModuleTree}, 14 descriptors::module::{ModuleId, ModuleScope, ModuleTree, ModuleSource},
15 descriptors::DescriptorDatabase, 15 descriptors::DescriptorDatabase,
16 input::FilesDatabase, 16 input::FilesDatabase,
17 Cancelable, FileId, 17 Cancelable, FileId,
@@ -35,7 +35,7 @@ pub(crate) fn resolve_based_completion(
35 let source_root_id = db.file_source_root(file_id); 35 let source_root_id = db.file_source_root(file_id);
36 let file = db.file_syntax(file_id); 36 let file = db.file_syntax(file_id);
37 let module_tree = db.module_tree(source_root_id)?; 37 let module_tree = db.module_tree(source_root_id)?;
38 let module_id = match module_tree.any_module_for_file(file_id) { 38 let module_id = match module_tree.any_module_for_source(ModuleSource::File(file_id)) {
39 None => return Ok(None), 39 None => return Ok(None),
40 Some(it) => it, 40 Some(it) => it,
41 }; 41 };