Skip to content

Commit

Permalink
Auto merge of #86564 - jsha:revert-83826, r=jyn514
Browse files Browse the repository at this point in the history
Revert "List trait impls before methods from deref in the sidebar ..."

This reverts commit 8a05892.

Fixes #85618

r? `@jyn514`
  • Loading branch information
bors committed Jun 23, 2021
2 parents 8cb207a + 093e246 commit 2ce052b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 2ce052b

Please sign in to comment.