move fuzzy source binding to a separete mode

This commit is contained in:
Aleksey Kladov 2018-12-05 13:16:20 +03:00
parent 7960c8b276
commit 4344264024
7 changed files with 121 additions and 131 deletions

View file

@ -9,6 +9,7 @@ use ra_syntax::{
};
use ra_db::SyntaxDatabase;
use rustc_hash::{FxHashMap};
use hir::source_binder;
use crate::{
db,
@ -36,7 +37,7 @@ pub(crate) fn completions(
original_file.reparse(&edit)
};
let module = ctry!(hir::Module::guess_from_position(db, position)?);
let module = ctry!(source_binder::module_from_position(db, position)?);
let mut res = Vec::new();
let mut has_completions = false;