diff options
| author | Camelid <camelidcamel@gmail.com> | 2021-04-12 20:13:19 -0700 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2021-05-11 09:55:31 -0700 |
| commit | db3a06d01eb517448954ec0eaccd68f88be988e0 (patch) | |
| tree | a101acb955d00f986648ecf5d93fcbab5184dfe4 /src/librustdoc/html/render | |
| parent | 9615d6dd48489a4700b31b301fe1a45cfa3e536e (diff) | |
| download | rust-db3a06d01eb517448954ec0eaccd68f88be988e0.tar.gz rust-db3a06d01eb517448954ec0eaccd68f88be988e0.zip | |
Fix a few small things
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 2de1a2226f5..1fe445b2ea1 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 @@ fn document_non_exhaustive(w: &mut Buffer, item: &clean::Item) { } } -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, - "<strong>Size:</strong> {size} byte{pl}", + "<p><strong>Size:</strong> {size} byte{pl}</p>", size = ty_layout.layout.size.bytes(), pl = if ty_layout.layout.size.bytes() == 1 { "" } else { "s" }, ); |
