Put LayoutError
behind reference to shrink result
`LayoutError` is 24 bytes, which is bigger than the `Ok` types, so let's shrink that.
This commit is contained in:
parent
6162f6f123
commit
3019c1cb2a
13 changed files with 89 additions and 56 deletions
|
@ -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()),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue