From 88a15d10d543c09ef66a9f105c3dcdb5011abbee Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 4 Nov 2018 20:21:20 +0300 Subject: use module_for_source --- crates/ra_analysis/src/completion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 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}; use crate::{ db::{self, SyntaxDatabase}, descriptors::function::FnScopes, - descriptors::module::{ModuleId, ModuleScope, ModuleTree}, + descriptors::module::{ModuleId, ModuleScope, ModuleTree, ModuleSource}, descriptors::DescriptorDatabase, input::FilesDatabase, Cancelable, FileId, @@ -35,7 +35,7 @@ pub(crate) fn resolve_based_completion( let source_root_id = db.file_source_root(file_id); let file = db.file_syntax(file_id); let module_tree = db.module_tree(source_root_id)?; - let module_id = match module_tree.any_module_for_file(file_id) { + let module_id = match module_tree.any_module_for_source(ModuleSource::File(file_id)) { None => return Ok(None), Some(it) => it, }; -- cgit v1.2.3