aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs5
-rw-r--r--crates/ra_ide_api/src/completion/completion_item.rs1
2 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index e039a333c..4768efdc1 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -40,7 +40,10 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
40 .add_to(acc) 40 .add_to(acc)
41 }); 41 });
42 } 42 }
43 hir::ModuleDef::Function(_) | hir::ModuleDef::Struct(_) | hir::ModuleDef::Def(_) => return, 43 hir::ModuleDef::Function(_)
44 | hir::ModuleDef::Struct(_)
45 | hir::ModuleDef::Def(_)
46 | hir::ModuleDef::EnumVariant(_) => return,
44 }; 47 };
45} 48}
46 49
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs
index f2301653a..ee1f8bce0 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide_api/src/completion/completion_item.rs
@@ -222,6 +222,7 @@ impl Builder {
222 hir::ModuleDef::Function(func) => return self.from_function(ctx, func), 222 hir::ModuleDef::Function(func) => return self.from_function(ctx, func),
223 hir::ModuleDef::Struct(it) => (CompletionItemKind::Struct, it.docs(ctx.db)), 223 hir::ModuleDef::Struct(it) => (CompletionItemKind::Struct, it.docs(ctx.db)),
224 hir::ModuleDef::Enum(it) => (CompletionItemKind::Enum, it.docs(ctx.db)), 224 hir::ModuleDef::Enum(it) => (CompletionItemKind::Enum, it.docs(ctx.db)),
225 hir::ModuleDef::EnumVariant(it) => (CompletionItemKind::EnumVariant, it.docs(ctx.db)),
225 hir::ModuleDef::Def(def_id) => match def_id.resolve(ctx.db) { 226 hir::ModuleDef::Def(def_id) => match def_id.resolve(ctx.db) {
226 hir::Def::Trait(it) => (CompletionItemKind::Trait, it.docs(ctx.db)), 227 hir::Def::Trait(it) => (CompletionItemKind::Trait, it.docs(ctx.db)),
227 hir::Def::Type(it) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), 228 hir::Def::Type(it) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)),