From db3a06d01eb517448954ec0eaccd68f88be988e0 Mon Sep 17 00:00:00 2001 From: Camelid Date: Mon, 12 Apr 2021 20:13:19 -0700 Subject: [PATCH] Fix a few small things --- src/librustdoc/html/render/print_item.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 2de1a2226f5c..1fe445b2ea1b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -837,7 +837,7 @@ fn item_typedef(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::T // we need #14072 to make sense of the generics. render_assoc_items(w, cx, it, def_id, AssocItemRender::All); - document_ty_layout(w, cx, def_id); + document_type_layout(w, cx, def_id); } fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Union) { @@ -886,7 +886,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni } let def_id = it.def_id.expect_real(); render_assoc_items(w, cx, it, def_id, AssocItemRender::All); - document_ty_layout(w, cx, def_id); + document_type_layout(w, cx, def_id); } fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum) { @@ -1023,7 +1023,7 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum } let def_id = it.def_id.expect_real(); render_assoc_items(w, cx, it, def_id, AssocItemRender::All); - document_ty_layout(w, cx, def_id); + document_type_layout(w, cx, def_id); } fn item_macro(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Macro) { @@ -1164,7 +1164,7 @@ fn item_struct(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::St } let def_id = it.def_id.expect_real(); render_assoc_items(w, cx, it, def_id, AssocItemRender::All); - document_ty_layout(w, cx, def_id); + document_type_layout(w, cx, def_id); } fn item_static(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Static) { @@ -1535,7 +1535,7 @@ struct update syntax will not work.", } } -fn document_ty_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { +fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { if !cx.shared.show_type_layout { return; } @@ -1560,7 +1560,7 @@ fn document_ty_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { } else { writeln!( w, - "Size: {size} byte{pl}", + "

Size: {size} byte{pl}

", size = ty_layout.layout.size.bytes(), pl = if ty_layout.layout.size.bytes() == 1 { "" } else { "s" }, );