Skip to content

Commit

Permalink
Rollup merge of rust-lang#86370 - matteo-briani:fix-rustdoc-stabilize…
Browse files Browse the repository at this point in the history
…d-versions-layout, r=GuillaumeGomez

Fix rustdoc stabilized versions layout

Fixes rust-lang#86342
r? ``@GuillaumeGomez``
  • Loading branch information
Dylan-DPC authored Jun 19, 2021
2 parents 212f703 + 68f9172 commit 6b7ea65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6b7ea65

Please sign in to comment.