Skip to content

Commit

Permalink
Rollup merge of rust-lang#73372 - GuillaumeGomez:re-order-sidebar-sec…
Browse files Browse the repository at this point in the history
…tions, r=kinnison

Re-order correctly the sections in the sidebar

Before that, "trait implementations" and "implementors" titles in the sidebar were before "methods" for example. Which wasn't logical considering that the two sections come after in the "content".

r? @kinnison
  • Loading branch information
Dylan-DPC authored Jun 15, 2020
2 parents 39345c2 + b67bdb5 commit ec1844d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4338,6 +4338,8 @@ fn sidebar_trait(buf: &mut Buffer, it: &clean::Item, t: &clean::Trait) {
}
}

sidebar.push_str(&sidebar_assoc_items(it));

sidebar.push_str("<a class=\"sidebar-title\" href=\"#implementors\">Implementors</a>");
if t.auto {
sidebar.push_str(
Expand All @@ -4346,8 +4348,6 @@ fn sidebar_trait(buf: &mut Buffer, it: &clean::Item, t: &clean::Trait) {
);
}

sidebar.push_str(&sidebar_assoc_items(it));

write!(buf, "<div class=\"block items\">{}</div>", sidebar)
}

Expand Down

0 comments on commit ec1844d

Please sign in to comment.