diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-30 23:05:27 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-07-01 21:16:25 +0200 |
| commit | 3019c1cb2a6e3f599fd0d71a7ddc5f2f8b46385c (patch) | |
| tree | c032f8d7aedd19b4b583fd272a7a846dca525ae9 /compiler/rustc_passes/src | |
| parent | 6162f6f12339aa81fe16b8a64644ead497e411b2 (diff) | |
| download | rust-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 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/layout_test.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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()), }); } |
