@@ -1613,14 +1613,14 @@ impl fmt::Display for AllTypes {
1613
1613
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1614
1614
write ! ( f,
1615
1615
"<h1 class='fqn'>\
1616
- <span class='in-band'>List of all items</span>\
1617
1616
<span class='out-of-band'>\
1618
1617
<span id='render-detail'>\
1619
1618
<a id=\" toggle-all-docs\" href=\" javascript:void(0)\" title=\" collapse all docs\" >\
1620
1619
[<span class='inner'>−</span>]\
1621
1620
</a>\
1622
1621
</span>
1623
1622
</span>
1623
+ <span class='in-band'>List of all items</span>\
1624
1624
</h1>") ?;
1625
1625
print_entries ( f, & self . structs , "Structs" , "structs" ) ?;
1626
1626
print_entries ( f, & self . enums , "Enums" , "enums" ) ?;
@@ -2068,7 +2068,34 @@ impl<'a> fmt::Display for Item<'a> {
2068
2068
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
2069
2069
debug_assert ! ( !self . item. is_stripped( ) ) ;
2070
2070
// 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'>" ) ?;
2072
2099
match self . item . inner {
2073
2100
clean:: ModuleItem ( ref m) => if m. is_crate {
2074
2101
write ! ( fmt, "Crate " ) ?;
@@ -2105,34 +2132,7 @@ impl<'a> fmt::Display for Item<'a> {
2105
2132
write ! ( fmt, "<a class=\" {}\" href=''>{}</a>" ,
2106
2133
self . item. type_( ) , self . item. name. as_ref( ) . unwrap( ) ) ?;
2107
2134
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
2136
2136
2137
2137
match self . item . inner {
2138
2138
clean:: ModuleItem ( ref m) =>
0 commit comments