about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorJules Bertholet <jules.bertholet@gmail.com>2022-03-30 10:37:55 -0400
committerJules Bertholet <jules.bertholet@gmail.com>2022-03-30 13:49:50 -0400
commitc8ab63b30f3f071f9ee9b14150613cd4a9e2c5c8 (patch)
tree64aa47f16f9eb7027972101c5741cc0451d32669 /src/librustdoc/html/render
parente50ff9b4521234e56ff46f8ed0372d5cb5689654 (diff)
downloadrust-c8ab63b30f3f071f9ee9b14150613cd4a9e2c5c8.tar.gz
rust-c8ab63b30f3f071f9ee9b14150613cd4a9e2c5c8.zip
Only show associated consts from inherent impls in sidebar
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 93b33b0d609..0cfe12abcd1 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -1987,6 +1987,7 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
             let used_links_bor = &mut used_links;
             let mut assoc_consts = v
                 .iter()
+                .filter(|i| i.inner_impl().trait_.is_none())
                 .flat_map(|i| get_associated_constants(i.inner_impl(), used_links_bor))
                 .collect::<Vec<_>>();
             if !assoc_consts.is_empty() {