aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/render/function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/render/function.rs')
-rw-r--r--crates/completion/src/render/function.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/completion/src/render/function.rs b/crates/completion/src/render/function.rs
index f5b0ce3e3..2d616b1fb 100644
--- a/crates/completion/src/render/function.rs
+++ b/crates/completion/src/render/function.rs
@@ -1,6 +1,7 @@
1//! Renderer for function calls. 1//! Renderer for function calls.
2 2
3use hir::{HasSource, Type}; 3use hir::{HasSource, Type};
4use ide_db::SymbolKind;
4use syntax::{ast::Fn, display::function_declaration}; 5use syntax::{ast::Fn, display::function_declaration};
5use test_utils::mark; 6use test_utils::mark;
6 7
@@ -44,7 +45,9 @@ impl<'a> FunctionRender<'a> {
44 CompletionItem::new(CompletionKind::Reference, self.ctx.source_range(), self.name.clone()) 45 CompletionItem::new(CompletionKind::Reference, self.ctx.source_range(), self.name.clone())
45 .kind(self.kind()) 46 .kind(self.kind())
46 .set_documentation(self.ctx.docs(self.func)) 47 .set_documentation(self.ctx.docs(self.func))
47 .set_deprecated(self.ctx.is_deprecated(self.func)) 48 .set_deprecated(
49 self.ctx.is_deprecated(self.func) || self.ctx.is_deprecated_assoc_item(self.func),
50 )
48 .detail(self.detail()) 51 .detail(self.detail())
49 .add_call_parens(self.ctx.completion, self.name, params) 52 .add_call_parens(self.ctx.completion, self.name, params)
50 .add_import(import_to_add) 53 .add_import(import_to_add)
@@ -103,7 +106,7 @@ impl<'a> FunctionRender<'a> {
103 if self.func.self_param(self.ctx.db()).is_some() { 106 if self.func.self_param(self.ctx.db()).is_some() {
104 CompletionItemKind::Method 107 CompletionItemKind::Method
105 } else { 108 } else {
106 CompletionItemKind::Function 109 SymbolKind::Function.into()
107 } 110 }
108 } 111 }
109} 112}