about summary refs log tree commit diff
path: root/src/librustdoc/html/templates
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-04-18 10:21:04 -0700
committerMichael Howell <michael@notriddle.com>2023-04-18 10:21:04 -0700
commit5f9746b94766e1dca4c4ee39da46a03a41d3fcd8 (patch)
treefb2edff18b7e2ef5572a1acdb1f6a086335a1bb3 /src/librustdoc/html/templates
parent08f204e17f1f007d844743802e04d7f62689e966 (diff)
downloadrust-5f9746b94766e1dca4c4ee39da46a03a41d3fcd8.tar.gz
rust-5f9746b94766e1dca4c4ee39da46a03a41d3fcd8.zip
rustdoc: use a separate template for type layout size
Diffstat (limited to 'src/librustdoc/html/templates')
-rw-r--r--src/librustdoc/html/templates/type_layout_size.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustdoc/html/templates/type_layout_size.html b/src/librustdoc/html/templates/type_layout_size.html
new file mode 100644
index 00000000000..9c2b39edc9f
--- /dev/null
+++ b/src/librustdoc/html/templates/type_layout_size.html
@@ -0,0 +1,12 @@
+{% if is_unsized %}
+  (unsized)
+{% else %}
+  {% if size == 1 %}
+    1 byte
+  {% else %}
+    {{ size +}} bytes
+  {% endif %}
+  {% if is_uninhabited %}
+    {# +#} (<a href="https://doc.rust-lang.org/stable/reference/glossary.html#uninhabited">uninhabited</a>)
+  {% endif %}
+{% endif %}