Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Aug 31, 2021
1 parent 8096910 commit 5f1505e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
if let Variants::Multiple { variants, tag, .. } = &ty_layout.layout.variants {
if !variants.is_empty() {
w.write_str(
"<p>\
<strong>Size for each variant:</strong>\
"<p><strong>Size for each variant:</strong></p>\
<ul>",
);

Expand All @@ -1665,7 +1664,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
write_size_of_layout(w, layout, tag_size);
writeln!(w, "</li>");
}
w.write_str("</ul></p>");
w.write_str("</ul>");
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/test/rustdoc/type-layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ pub struct Unsized([u8]);
// @!has type_layout/trait.MyTrait.html 'Size: '
pub trait MyTrait {}

// @has type_layout/enum.Variants.html '<code>A</code>: 0 bytes'
// @has type_layout/enum.Variants.html 'Size: '
// @has - '2 bytes'
// @has - '<code>A</code>: 0 bytes'
// @has - '<code>B</code>: 1 byte'
pub enum Variants {
A,
Expand Down

0 comments on commit 5f1505e

Please sign in to comment.