@@ -1613,14 +1613,14 @@ impl fmt::Display for AllTypes {
16131613 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
16141614 write ! ( f,
16151615"<h1 class='fqn'>\
1616- <span class='in-band'>List of all items</span>\
16171616 <span class='out-of-band'>\
16181617 <span id='render-detail'>\
16191618 <a id=\" toggle-all-docs\" href=\" javascript:void(0)\" title=\" collapse all docs\" >\
16201619 [<span class='inner'>−</span>]\
16211620 </a>\
16221621 </span>
16231622 </span>
1623+ <span class='in-band'>List of all items</span>\
16241624 </h1>") ?;
16251625 print_entries ( f, & self . structs , "Structs" , "structs" ) ?;
16261626 print_entries ( f, & self . enums , "Enums" , "enums" ) ?;
@@ -2068,7 +2068,34 @@ impl<'a> fmt::Display for Item<'a> {
20682068 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
20692069 debug_assert ! ( !self . item. is_stripped( ) ) ;
20702070 // Write the breadcrumb trail header for the top
2071- write ! ( fmt, "<h1 class='fqn'><span class='in-band'>" ) ?;
2071+ write ! ( fmt, "<h1 class='fqn'><span class='out-of-band'>" ) ?;
2072+ if let Some ( version) = self . item . stable_since ( ) {
2073+ write ! ( fmt, "<span class='since' title='Stable since Rust version {0}'>{0}</span>" ,
2074+ version) ?;
2075+ }
2076+ write ! ( fmt,
2077+ "<span id='render-detail'>\
2078+ <a id=\" toggle-all-docs\" href=\" javascript:void(0)\" \
2079+ title=\" collapse all docs\" >\
2080+ [<span class='inner'>−</span>]\
2081+ </a>\
2082+ </span>") ?;
2083+
2084+ // Write `src` tag
2085+ //
2086+ // When this item is part of a `pub use` in a downstream crate, the
2087+ // [src] link in the downstream documentation will actually come back to
2088+ // this page, and this link will be auto-clicked. The `id` attribute is
2089+ // used to find the link to auto-click.
2090+ if self . cx . shared . include_sources && !self . item . is_primitive ( ) {
2091+ if let Some ( l) = self . src_href ( ) {
2092+ write ! ( fmt, "<a class='srclink' href='{}' title='{}'>[src]</a>" ,
2093+ l, "goto source code" ) ?;
2094+ }
2095+ }
2096+
2097+ write ! ( fmt, "</span>" ) ?; // out-of-band
2098+ write ! ( fmt, "<span class='in-band'>" ) ?;
20722099 match self . item . inner {
20732100 clean:: ModuleItem ( ref m) => if m. is_crate {
20742101 write ! ( fmt, "Crate " ) ?;
@@ -2105,34 +2132,7 @@ impl<'a> fmt::Display for Item<'a> {
21052132 write ! ( fmt, "<a class=\" {}\" href=''>{}</a>" ,
21062133 self . item. type_( ) , self . item. name. as_ref( ) . unwrap( ) ) ?;
21072134
2108- write ! ( fmt, "</span>" ) ?; // in-band
2109- write ! ( fmt, "<span class='out-of-band'>" ) ?;
2110- if let Some ( version) = self . item . stable_since ( ) {
2111- write ! ( fmt, "<span class='since' title='Stable since Rust version {0}'>{0}</span>" ,
2112- version) ?;
2113- }
2114- write ! ( fmt,
2115- "<span id='render-detail'>\
2116- <a id=\" toggle-all-docs\" href=\" javascript:void(0)\" \
2117- title=\" collapse all docs\" >\
2118- [<span class='inner'>−</span>]\
2119- </a>\
2120- </span>") ?;
2121-
2122- // Write `src` tag
2123- //
2124- // When this item is part of a `pub use` in a downstream crate, the
2125- // [src] link in the downstream documentation will actually come back to
2126- // this page, and this link will be auto-clicked. The `id` attribute is
2127- // used to find the link to auto-click.
2128- if self . cx . shared . include_sources && !self . item . is_primitive ( ) {
2129- if let Some ( l) = self . src_href ( ) {
2130- write ! ( fmt, "<a class='srclink' href='{}' title='{}'>[src]</a>" ,
2131- l, "goto source code" ) ?;
2132- }
2133- }
2134-
2135- write ! ( fmt, "</span></h1>" ) ?; // out-of-band
2135+ write ! ( fmt, "</span></h1>" ) ?; // in-band
21362136
21372137 match self . item . inner {
21382138 clean:: ModuleItem ( ref m) =>
0 commit comments