Skip to content

Commit e6837eb

Browse files
jshacuviper
authored andcommitted
Revert "List trait impls before methods from deref in the sidebar of Rustdoc's output"
This reverts commit 8a05892. (cherry picked from commit 093e246)
1 parent 5b3a266 commit e6837eb

File tree

1 file changed

+8
-8
lines changed
  • src/librustdoc/html/render

1 file changed

+8
-8
lines changed

src/librustdoc/html/render/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,14 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
18871887
}
18881888

18891889
if v.iter().any(|i| i.inner_impl().trait_.is_some()) {
1890+
if let Some(impl_) = v
1891+
.iter()
1892+
.filter(|i| i.inner_impl().trait_.is_some())
1893+
.find(|i| i.inner_impl().trait_.def_id_full(cache) == cx.cache.deref_trait_did)
1894+
{
1895+
sidebar_deref_methods(cx, out, impl_, v);
1896+
}
1897+
18901898
let format_impls = |impls: Vec<&Impl>| {
18911899
let mut links = FxHashSet::default();
18921900

@@ -1954,14 +1962,6 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
19541962
);
19551963
write_sidebar_links(out, blanket_format);
19561964
}
1957-
1958-
if let Some(impl_) = v
1959-
.iter()
1960-
.filter(|i| i.inner_impl().trait_.is_some())
1961-
.find(|i| i.inner_impl().trait_.def_id_full(cache) == cx.cache.deref_trait_did)
1962-
{
1963-
sidebar_deref_methods(cx, out, impl_, v);
1964-
}
19651965
}
19661966
}
19671967
}

0 commit comments

Comments
 (0)