aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-11 18:56:00 +0100
committerGitHub <[email protected]>2021-06-11 18:56:00 +0100
commit863e23f00f90c0ddd408e906618586a98273a14c (patch)
tree54e1a9bdeacaf894149e44141d2c5fc485c28ce3 /crates/ide_completion/src
parent21d441623574e5d5ffa2d8f1add7582c7231e109 (diff)
parentdb4a1fcab4610db2ab31d2048ab49fbcbcfce1cc (diff)
Merge #9219
9219: minor: Replace some AssocItem::containing_trait calls trait_or_trait_impl r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src')
-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 2eabc2a67..d3db55c35 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> {