diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-10-27 00:16:44 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-10-27 23:09:18 +0200 |
| commit | 7bde5913274baf1b316b7900b1566fca066d8b9f (patch) | |
| tree | c7069e99745949a003118748c43ceb3e67da89c3 | |
| parent | 8fb1250aba8135679463351a3813c04ae45bf311 (diff) | |
| download | rust-7bde5913274baf1b316b7900b1566fca066d8b9f.tar.gz rust-7bde5913274baf1b316b7900b1566fca066d8b9f.zip | |
Change sidebar items order
| -rw-r--r-- | src/librustdoc/html/render.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index b73988823f4..bdcfa782bb7 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -3568,7 +3568,7 @@ fn sidebar_assoc_items(it: &clean::Item) -> String { let ret = v.iter() .filter_map(|i| if let Some(ref i) = i.inner_impl().trait_ { let out = format!("{:#}", i).replace("<", "<").replace(">", ">"); - Some(format!("<a href=\"#impl-{:#}\">{name}</a>", i, out)) + Some(format!("<a href=\"#impl-{:#}\">{}</a>", i, out)) } else { None }) @@ -3625,8 +3625,6 @@ fn sidebar_trait(fmt: &mut fmt::Formatter, it: &clean::Item, sidebar.push_str("<li><a href=\"#provided-methods\">Provided Methods</a></li>"); } - sidebar.push_str(&sidebar_assoc_items(it)); - let c = cache(); if let Some(implementors) = c.implementors.get(&it.def_id) { @@ -3640,6 +3638,8 @@ fn sidebar_trait(fmt: &mut fmt::Formatter, it: &clean::Item, sidebar.push_str("<li><a href=\"#implementors\">Implementors</a></li>"); + sidebar.push_str(&sidebar_assoc_items(it)); + write!(fmt, "<div class=\"block items\">{}</div>", sidebar) } |
