Add functions to DefId

This commit is contained in:
Aleksey Kladov 2018-12-04 23:44:00 +03:00
parent 947e3350e0
commit d8b0379e10
10 changed files with 90 additions and 83 deletions

View file

@ -163,7 +163,7 @@ fn complete_path(
};
let target_module = match def_id.resolve(db)? {
Def::Module(it) => it,
Def::Item => return Ok(()),
_ => return Ok(()),
};
let module_scope = target_module.scope(db)?;
let completions = module_scope.entries().map(|(name, _res)| CompletionItem {