about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-08-31 05:24:08 +0000
committerDeadbeef <ent3rm4n@gmail.com>2021-08-31 05:25:39 +0000
commit5f1505e7f13fdea3f2d626059010cf26edfce4f8 (patch)
treec89acfbd8992c8793bb55de6d9627d58540781aa
parent8096910b54920f4c3334de555ee9dd265ed6f49d (diff)
downloadrust-5f1505e7f13fdea3f2d626059010cf26edfce4f8.tar.gz
rust-5f1505e7f13fdea3f2d626059010cf26edfce4f8.zip
Apply suggestions
-rw-r--r--src/librustdoc/html/render/print_item.rs5
-rw-r--r--src/test/rustdoc/type-layout.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 4e90e611a16..6054073bf79 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -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>",
                     );
 
@@ -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>");
                 }
             }
         }
diff --git a/src/test/rustdoc/type-layout.rs b/src/test/rustdoc/type-layout.rs
index bc1b65c46e2..8c4f4f8fc98 100644
--- a/src/test/rustdoc/type-layout.rs
+++ b/src/test/rustdoc/type-layout.rs
@@ -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,