about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-09-05 12:33:05 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-09-05 12:33:05 +0200
commit8f9c4b36fe2a2308f24d66e1d75ec54e3f3fcdb7 (patch)
tree6bc7634a2f82e615e2cdb9252914da06e2a768c6
parent238944c5d7035da09810d84179eeb81a9dac37f0 (diff)
downloadrust-8f9c4b36fe2a2308f24d66e1d75ec54e3f3fcdb7.tar.gz
rust-8f9c4b36fe2a2308f24d66e1d75ec54e3f3fcdb7.zip
Update to new rustdoc internal API
-rw-r--r--src/librustdoc/html/render/sidebar.rs29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/librustdoc/html/render/sidebar.rs b/src/librustdoc/html/render/sidebar.rs
index b9e46851465..06cc57b2a55 100644
--- a/src/librustdoc/html/render/sidebar.rs
+++ b/src/librustdoc/html/render/sidebar.rs
@@ -419,6 +419,11 @@ fn sidebar_assoc_items<'a>(
                 "associatedconstant",
                 assoc_consts,
             ),
+            LinkBlock::new(
+                Link::new("implementations", "Associated Types"),
+                "associatedtype",
+                assoc_types,
+            ),
             LinkBlock::new(Link::new("implementations", "Methods"), "method", methods),
         ];
 
@@ -436,24 +441,16 @@ fn sidebar_assoc_items<'a>(
             let (blanket_impl, concrete): (Vec<&Impl>, Vec<&Impl>) =
                 concrete.into_iter().partition::<Vec<_>, _>(|i| i.inner_impl().kind.is_blanket());
 
-            sidebar_render_assoc_items(cx, &mut id_map, concrete, synthetic, blanket_impl, &mut blocks);
+            sidebar_render_assoc_items(
+                cx,
+                &mut id_map,
+                concrete,
+                synthetic,
+                blanket_impl,
+                &mut blocks,
+            );
         }
 
-        blocks.extend([
-            LinkBlock::new(
-                Link::new("implementations", "Associated Constants"),
-                "associatedconstant",
-                assoc_consts,
-            ),
-            LinkBlock::new(
-                Link::new("implementations", "Associated Types"),
-                "associatedtype",
-                assoc_types,
-            ),
-            LinkBlock::new(Link::new("implementations", "Methods"), "method", methods),
-        ]);
-        blocks.append(&mut deref_methods);
-        blocks.extend([concrete, synthetic, blanket]);
         links.append(&mut blocks);
     }
 }