about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2021-06-22 18:18:54 -0700
committerJacob Hoffman-Andrews <github@hoffman-andrews.com>2021-06-22 18:18:54 -0700
commit093e2464455bd7fff614ff4c658f6a1eb5e7a89d (patch)
tree3f924e259d2b4627420e6621d06108bf385f5ed9 /src/librustdoc/html/render
parent6a758ea7e48416b968955535094479dc2e7cc9e1 (diff)
downloadrust-093e2464455bd7fff614ff4c658f6a1eb5e7a89d.tar.gz
rust-093e2464455bd7fff614ff4c658f6a1eb5e7a89d.zip
Revert "List trait impls before methods from deref in the sidebar of Rustdoc's output"
This reverts commit 8a058926ecd6d0988714f8f7a5a31293c533f8c6.
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 03b607c2d2c..8c922240c44 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -1887,6 +1887,14 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
         }
 
         if v.iter().any(|i| i.inner_impl().trait_.is_some()) {
+            if let Some(impl_) = v
+                .iter()
+                .filter(|i| i.inner_impl().trait_.is_some())
+                .find(|i| i.inner_impl().trait_.def_id_full(cache) == cx.cache.deref_trait_did)
+            {
+                sidebar_deref_methods(cx, out, impl_, v);
+            }
+
             let format_impls = |impls: Vec<&Impl>| {
                 let mut links = FxHashSet::default();
 
@@ -1954,14 +1962,6 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
                 );
                 write_sidebar_links(out, blanket_format);
             }
-
-            if let Some(impl_) = v
-                .iter()
-                .filter(|i| i.inner_impl().trait_.is_some())
-                .find(|i| i.inner_impl().trait_.def_id_full(cache) == cx.cache.deref_trait_did)
-            {
-                sidebar_deref_methods(cx, out, impl_, v);
-            }
         }
     }
 }