aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index 9946db4ca..2d670372e 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -170,12 +170,13 @@ impl Completions {
170 fn add_adt_with_name(&mut self, ctx: &CompletionContext, name: String, adt: hir::Adt) { 170 fn add_adt_with_name(&mut self, ctx: &CompletionContext, name: String, adt: hir::Adt) {
171 let builder = CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name); 171 let builder = CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name);
172 172
173 let (kind, docs) = match adt { 173 let kind = match adt {
174 hir::Adt::Struct(it) => (CompletionItemKind::Struct, it.docs(ctx.db)), 174 hir::Adt::Struct(_) => CompletionItemKind::Struct,
175 // FIXME: add CompletionItemKind::Union 175 // FIXME: add CompletionItemKind::Union
176 hir::Adt::Union(it) => (CompletionItemKind::Struct, it.docs(ctx.db)), 176 hir::Adt::Union(_) => CompletionItemKind::Struct,
177 hir::Adt::Enum(it) => (CompletionItemKind::Enum, it.docs(ctx.db)), 177 hir::Adt::Enum(_) => CompletionItemKind::Enum,
178 }; 178 };
179 let docs = adt.docs(ctx.db);
179 180
180 builder.kind(kind).set_documentation(docs).add_to(self) 181 builder.kind(kind).set_documentation(docs).add_to(self)
181 } 182 }