about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-04-30 23:05:27 +0200
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-07-01 21:16:25 +0200
commit3019c1cb2a6e3f599fd0d71a7ddc5f2f8b46385c (patch)
treec032f8d7aedd19b4b583fd272a7a846dca525ae9 /src/librustdoc/html
parent6162f6f12339aa81fe16b8a64644ead497e411b2 (diff)
downloadrust-3019c1cb2a6e3f599fd0d71a7ddc5f2f8b46385c.tar.gz
rust-3019c1cb2a6e3f599fd0d71a7ddc5f2f8b46385c.zip
Put `LayoutError` behind reference to shrink result
`LayoutError` is 24 bytes, which is bigger than the `Ok` types, so let's
shrink that.
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/type_layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/type_layout.rs b/src/librustdoc/html/render/type_layout.rs
index c9b95b1e645..0bc32ea5a20 100644
--- a/src/librustdoc/html/render/type_layout.rs
+++ b/src/librustdoc/html/render/type_layout.rs
@@ -17,7 +17,7 @@ use crate::html::render::Context;
 #[template(path = "type_layout.html")]
 struct TypeLayout<'cx> {
     variants: Vec<(Symbol, TypeLayoutSize)>,
-    type_layout_size: Result<TypeLayoutSize, LayoutError<'cx>>,
+    type_layout_size: Result<TypeLayoutSize, &'cx LayoutError<'cx>>,
 }
 
 #[derive(Template)]