Skip to content

Commit 68f9172

Browse files
author
Matteo Briani
committed
Fix rustdoc stabilized versions layout
1 parent 8daad74 commit 68f9172

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/librustdoc/html/render/print_item.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,9 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
979979
}
980980
w.write_str(")");
981981
}
982-
w.write_str("</code></div>");
982+
w.write_str("</code>");
983+
render_stability_since(w, variant, it, cx.tcx());
984+
w.write_str("</div>");
983985
document(w, cx, variant, Some(it));
984986
document_non_exhaustive(w, variant);
985987

@@ -1021,7 +1023,6 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
10211023
w.write_str("</div></div>");
10221024
toggle_close(w);
10231025
}
1024-
render_stability_since(w, variant, it, cx.tcx());
10251026
}
10261027
}
10271028
let def_id = it.def_id.expect_real();

src/librustdoc/html/static/rustdoc.css

+6
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,12 @@ a {
654654
background: transparent;
655655
}
656656

657+
.small-section-header {
658+
display: flex;
659+
justify-content: space-between;
660+
position: relative;
661+
}
662+
657663
.small-section-header:hover > .anchor {
658664
display: initial;
659665
}

0 commit comments

Comments
 (0)