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(""); + w.write_str(""); + render_stability_since(w, variant, it, cx.tcx()); + w.write_str(""); 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(""); 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; }