From 3019c1cb2a6e3f599fd0d71a7ddc5f2f8b46385c Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:05:27 +0200 Subject: Put `LayoutError` behind reference to shrink result `LayoutError` is 24 bytes, which is bigger than the `Ok` types, so let's shrink that. --- compiler/rustc_passes/src/layout_test.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_passes/src') diff --git a/compiler/rustc_passes/src/layout_test.rs b/compiler/rustc_passes/src/layout_test.rs index 9971bdf45bb..098107f8f23 100644 --- a/compiler/rustc_passes/src/layout_test.rs +++ b/compiler/rustc_passes/src/layout_test.rs @@ -94,6 +94,7 @@ fn dump_layout_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId, attr: &Attribute) { Err(layout_error) => { tcx.sess.emit_fatal(Spanned { node: layout_error.into_diagnostic(), + span: tcx.def_span(item_def_id.to_def_id()), }); } -- cgit 1.4.1-3-g733a5