Skip to content

Commit 5f1505e

Browse files
committed
Apply suggestions
1 parent 8096910 commit 5f1505e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustdoc/html/render/print_item.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1642,8 +1642,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
16421642
if let Variants::Multiple { variants, tag, .. } = &ty_layout.layout.variants {
16431643
if !variants.is_empty() {
16441644
w.write_str(
1645-
"<p>\
1646-
<strong>Size for each variant:</strong>\
1645+
"<p><strong>Size for each variant:</strong></p>\
16471646
<ul>",
16481647
);
16491648

@@ -1665,7 +1664,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
16651664
write_size_of_layout(w, layout, tag_size);
16661665
writeln!(w, "</li>");
16671666
}
1668-
w.write_str("</ul></p>");
1667+
w.write_str("</ul>");
16691668
}
16701669
}
16711670
}

src/test/rustdoc/type-layout.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ pub struct Unsized([u8]);
5353
// @!has type_layout/trait.MyTrait.html 'Size: '
5454
pub trait MyTrait {}
5555

56-
// @has type_layout/enum.Variants.html '<code>A</code>: 0 bytes'
56+
// @has type_layout/enum.Variants.html 'Size: '
57+
// @has - '2 bytes'
58+
// @has - '<code>A</code>: 0 bytes'
5759
// @has - '<code>B</code>: 1 byte'
5860
pub enum Variants {
5961
A,

0 commit comments

Comments
 (0)