Show deprecated completions for deprecated traits

This commit is contained in:
Kirill Bulatov 2021-01-19 01:08:59 +02:00
parent cc663a7b0c
commit ca65488276
8 changed files with 69 additions and 28 deletions

View file

@ -44,7 +44,9 @@ impl<'a> FunctionRender<'a> {
CompletionItem::new(CompletionKind::Reference, self.ctx.source_range(), self.name.clone())
.kind(self.kind())
.set_documentation(self.ctx.docs(self.func))
.set_deprecated(self.ctx.is_deprecated(self.func))
.set_deprecated(
self.ctx.is_deprecated(self.func) || self.ctx.is_deprecated_assoc_item(self.func),
)
.detail(self.detail())
.add_call_parens(self.ctx.completion, self.name, params)
.add_import(import_to_add)