diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 69d66693f75..547d6696a43 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -311,7 +311,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
w,
"
\n{}",
+ {}",
ITEM_TABLE_OPEN,
id = cx.derive_id(my_section.id().to_owned()),
name = my_section.name(),
@@ -415,10 +415,10 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
write!(
w,
"\
-
{name}\
- {visibility_emoji}\
- {unsafety_flag}\
- {stab_tags}\
+
{name}\
+ {visibility_emoji}\
+ {unsafety_flag}\
+ {stab_tags}\
\
{docs}
",
name = myitem.name.unwrap(),
@@ -1126,7 +1126,8 @@ fn item_union(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean:
write!(
w,
"\
- Fields
"
+ Fields\
+ "
);
for (field, ty) in fields {
let name = field.name.expect("union field name");
@@ -1238,7 +1239,8 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
write!(
w,
"\
- Variants{}
",
+ Variants{}\
+ ",
document_non_exhaustive_header(it)
);
document_non_exhaustive(w, it);
@@ -1294,9 +1296,9 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
w,
"\
\
- \
- {f}: {t}
\
- ",
+
\
+
{f}: {t}
\
+ ",
id = id,
f = field.name.unwrap(),
t = ty.print(cx)
diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html
index 9a551b68279..8e25f6764a9 100644
--- a/src/librustdoc/html/templates/page.html
+++ b/src/librustdoc/html/templates/page.html
@@ -82,10 +82,10 @@
{%- else -%}

{#- -#}
{%- endif -%}
-
+ {#- -#}
{#- -#}
-
-
+ {#- -#}
+ {#- -#}
{#- -#}
@@ -122,12 +122,12 @@
{#- -#}
{#- -#}
{#- -#}
- {#- -#}
{#- -#}
{#- -#}
{#- -#}
@@ -143,6 +143,6 @@
data-resource-suffix="{{page.resource_suffix}}" {# -#}
data-rustdoc-version="{{rustdoc_version}}" {# -#}
> {#- -#}
-
+ {#- -#}