about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-19 10:14:09 +0900
committerGitHub <noreply@github.com>2021-06-19 10:14:09 +0900
commit41bf471950dcf7cee52cf73a9f1ee979b7c39971 (patch)
tree4043ee23d33bf52ceb6ee02846076634211b5901 /src/librustdoc/html
parent0c7b74fcef4fcb4d64d1b6d96c3afd8d39a91e25 (diff)
parent68f9172fc136ab0b5cbc082eb7a51a725c108a7d (diff)
downloadrust-41bf471950dcf7cee52cf73a9f1ee979b7c39971.tar.gz
rust-41bf471950dcf7cee52cf73a9f1ee979b7c39971.zip
Rollup merge of #86370 - matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez
Fix rustdoc stabilized versions layout

Fixes #86342
r? `@GuillaumeGomez`
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/print_item.rs5
-rw-r--r--src/librustdoc/html/static/rustdoc.css6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 8fd53538912..48cbd94ccab 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -981,7 +981,9 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
                 }
                 w.write_str(")");
             }
-            w.write_str("</code></div>");
+            w.write_str("</code>");
+            render_stability_since(w, variant, it, cx.tcx());
+            w.write_str("</div>");
             document(w, cx, variant, Some(it));
             document_non_exhaustive(w, variant);
 
@@ -1023,7 +1025,6 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
                 w.write_str("</div></div>");
                 toggle_close(w);
             }
-            render_stability_since(w, variant, it, cx.tcx());
         }
     }
     let def_id = it.def_id.expect_real();
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 9a59ee528a0..89f5d592241 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -653,6 +653,12 @@ a {
 	background: transparent;
 }
 
+.small-section-header {
+	display: flex;
+	justify-content: space-between;
+	position: relative;
+}
+
 .small-section-header:hover > .anchor {
 	display: initial;
 }