From db4a1fcab4610db2ab31d2048ab49fbcbcfce1cc Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 11 Jun 2021 19:55:24 +0200 Subject: Replace some AssocItem::containing_trait calls trait_or_trait_impl --- crates/ide_completion/src/render.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ide_completion/src') diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index 902df46ca..f24ef7e49 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs @@ -111,7 +111,10 @@ impl<'a> RenderContext<'a> { hir::AssocItem::TypeAlias(it) => self.is_deprecated(it), }; is_assoc_deprecated - || assoc.containing_trait(db).map(|trait_| self.is_deprecated(trait_)).unwrap_or(false) + || assoc + .containing_trait_or_trait_impl(db) + .map(|trait_| self.is_deprecated(trait_)) + .unwrap_or(false) } fn docs(&self, node: impl HasAttrs) -> Option { -- cgit v1.2.3