This commit is contained in:
Florian Diebold 2019-01-27 17:23:49 +01:00
parent afce8e4426
commit d3df80dfe4
7 changed files with 17 additions and 27 deletions

View file

@ -1,11 +1,11 @@
use join_to_string::join;
use hir::{Docs, Resolution};
use crate::{
completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext},
};
use hir::Docs;
pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
let path = match &ctx.path_prefix {
Some(path) => path.clone(),
@ -15,7 +15,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
Some(Resolution::Def { def }) => def,
_ => return,
};
match def_id {
match def {
hir::ModuleDef::Module(module) => {
let module_scope = module.scope(ctx.db);
for (name, res) in module_scope.entries() {