diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index c2978a62489a0..470aa2c10e977 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1613,7 +1613,6 @@ impl fmt::Display for AllTypes {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f,
"
")?;
print_entries(f, &self.structs, "Structs", "structs")?;
print_entries(f, &self.enums, "Enums", "enums")?;
@@ -2068,7 +2068,34 @@ impl<'a> fmt::Display for Item<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
debug_assert!(!self.item.is_stripped());
// Write the breadcrumb trail header for the top
- write!(fmt, "")?;
+ write!(fmt, "")?;
+ if let Some(version) = self.item.stable_since() {
+ write!(fmt, "{0}",
+ version)?;
+ }
+ write!(fmt,
+ "\
+ \
+ [−]\
+ \
+ ")?;
+
+ // Write `src` tag
+ //
+ // When this item is part of a `pub use` in a downstream crate, the
+ // [src] link in the downstream documentation will actually come back to
+ // this page, and this link will be auto-clicked. The `id` attribute is
+ // used to find the link to auto-click.
+ if self.cx.shared.include_sources && !self.item.is_primitive() {
+ if let Some(l) = self.src_href() {
+ write!(fmt, "[src]",
+ l, "goto source code")?;
+ }
+ }
+
+ write!(fmt, "")?; // out-of-band
+ write!(fmt, "")?;
match self.item.inner {
clean::ModuleItem(ref m) => if m.is_crate {
write!(fmt, "Crate ")?;
@@ -2105,34 +2132,7 @@ impl<'a> fmt::Display for Item<'a> {
write!(fmt, "{}",
self.item.type_(), self.item.name.as_ref().unwrap())?;
- write!(fmt, "")?; // in-band
- write!(fmt, "")?;
- if let Some(version) = self.item.stable_since() {
- write!(fmt, "{0}",
- version)?;
- }
- write!(fmt,
- "\
- \
- [−]\
- \
- ")?;
-
- // Write `src` tag
- //
- // When this item is part of a `pub use` in a downstream crate, the
- // [src] link in the downstream documentation will actually come back to
- // this page, and this link will be auto-clicked. The `id` attribute is
- // used to find the link to auto-click.
- if self.cx.shared.include_sources && !self.item.is_primitive() {
- if let Some(l) = self.src_href() {
- write!(fmt, "[src]",
- l, "goto source code")?;
- }
- }
-
- write!(fmt, "
")?; // out-of-band
+ write!(fmt, "
")?; // in-band
match self.item.inner {
clean::ModuleItem(ref m) =>
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 496029e33fc65..57a111daa8977 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -97,7 +97,7 @@ h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4
h1.fqn {
border-bottom: 1px dashed;
margin-top: 0;
- position: relative;
+ overflow: auto;
}
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
border-bottom: 1px solid;
@@ -352,14 +352,11 @@ nav.sub {
}
.content .out-of-band {
+ float: right;
font-size: 23px;
margin: 0px;
padding: 0px;
- text-align: right;
- display: inline-block;
font-weight: normal;
- position: absolute;
- right: 0;
}
h3.impl > .out-of-band {