aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-06-11 18:55:24 +0100
committerLukas Wirth <[email protected]>2021-06-11 18:55:24 +0100
commitdb4a1fcab4610db2ab31d2048ab49fbcbcfce1cc (patch)
tree7893024cc5766e5880bb8f97684aebd31a55bb6d /crates/ide_completion
parent48f65b3b157a5b974be6252dd8fc9ffc158d4217 (diff)
Replace some AssocItem::containing_trait calls trait_or_trait_impl
Diffstat (limited to 'crates/ide_completion')
-rw-r--r--crates/ide_completion/src/render.rs5
1 files changed, 4 insertions, 1 deletions
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> {
111 hir::AssocItem::TypeAlias(it) => self.is_deprecated(it), 111 hir::AssocItem::TypeAlias(it) => self.is_deprecated(it),
112 }; 112 };
113 is_assoc_deprecated 113 is_assoc_deprecated
114 || assoc.containing_trait(db).map(|trait_| self.is_deprecated(trait_)).unwrap_or(false) 114 || assoc
115 .containing_trait_or_trait_impl(db)
116 .map(|trait_| self.is_deprecated(trait_))
117 .unwrap_or(false)
115 } 118 }
116 119
117 fn docs(&self, node: impl HasAttrs) -> Option<hir::Documentation> { 120 fn docs(&self, node: impl HasAttrs) -> Option<hir::Documentation> {