about summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-06-15 14:30:14 +0200
committerTrinity Pointard <trinity.pointard@gmail.com>2021-06-15 14:30:14 +0200
commit2d76d44eaefc2859c0e5d7645f7a543cd15d5320 (patch)
tree80d3e658f8f888879c297f4f3a71d67479aeb4d9 /src/librustdoc/html/render/mod.rs
parentaee50f417f38ce57f2491ee86fb386e7d32f241c (diff)
downloadrust-2d76d44eaefc2859c0e5d7645f7a543cd15d5320.tar.gz
rust-2d76d44eaefc2859c0e5d7645f7a543cd15d5320.zip
remove code for recursive Deref in sidebar
fix #85037
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
-rw-r--r--src/librustdoc/html/render/mod.rs31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 7e53cf231a1..54171733c30 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -1960,19 +1960,13 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
                 .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, FxHashSet::default());
+                sidebar_deref_methods(cx, out, impl_, v);
             }
         }
     }
 }
 
-fn sidebar_deref_methods(
-    cx: &Context<'_>,
-    out: &mut Buffer,
-    impl_: &Impl,
-    v: &Vec<Impl>,
-    mut already_seen: FxHashSet<DefId>,
-) {
+fn sidebar_deref_methods(cx: &Context<'_>, out: &mut Buffer, impl_: &Impl, v: &Vec<Impl>) {
     let c = cx.cache();
 
     debug!("found Deref: {:?}", impl_);
@@ -2029,27 +2023,6 @@ fn sidebar_deref_methods(
                 out.push_str("</div>");
             }
         }
-
-        // Recurse into any further impls that might exist for `target`
-        if let Some(target_did) = target.def_id_full(c) {
-            if let Some(target_impls) = c.impls.get(&target_did) {
-                if let Some(target_deref_impl) = target_impls
-                    .iter()
-                    .filter(|i| i.inner_impl().trait_.is_some())
-                    .find(|i| i.inner_impl().trait_.def_id_full(c) == c.deref_trait_did)
-                {
-                    if already_seen.insert(target_did.clone()) {
-                        sidebar_deref_methods(
-                            cx,
-                            out,
-                            target_deref_impl,
-                            target_impls,
-                            already_seen,
-                        );
-                    }
-                }
-            }
-        }
     }
 }