From 5f1505e7f13fdea3f2d626059010cf26edfce4f8 Mon Sep 17 00:00:00 2001
From: Deadbeef
Date: Tue, 31 Aug 2021 05:24:08 +0000
Subject: [PATCH] Apply suggestions
---
src/librustdoc/html/render/print_item.rs | 5 ++---
src/test/rustdoc/type-layout.rs | 4 +++-
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(
- "\
- Size for each variant:\
+ "
Size for each variant:
\
",
);
@@ -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, "");
}
- w.write_str("
");
+ w.write_str("");
}
}
}
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 'A
: 0 bytes'
+// @has type_layout/enum.Variants.html 'Size: '
+// @has - '2 bytes'
+// @has - 'A
: 0 bytes'
// @has - 'B
: 1 byte'
pub enum Variants {
A,