diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-16 09:41:36 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-16 09:41:36 +0000 |
| commit | 9ca82a9a3d987985aea5c87b3d4d1546cb5d04c9 (patch) | |
| tree | 0b1cbc897c208987808600cc27f829faf9ab3f5e | |
| parent | a501d96f3368575eb9a8feeb3f16f5900dc06b48 (diff) | |
| download | rust-9ca82a9a3d987985aea5c87b3d4d1546cb5d04c9.tar.gz rust-9ca82a9a3d987985aea5c87b3d4d1546cb5d04c9.zip | |
Fix ICE on unsized locals
Fixes #1312
| -rw-r--r-- | src/abi/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/abi/mod.rs b/src/abi/mod.rs index 65cc6b43767..416bce48498 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -161,6 +161,12 @@ fn make_local_place<'tcx>( layout: TyAndLayout<'tcx>, is_ssa: bool, ) -> CPlace<'tcx> { + if layout.is_unsized() { + fx.tcx.sess.span_fatal( + fx.mir.local_decls[local].source_info.span, + "unsized locals are not yet supported", + ); + } let place = if is_ssa { if let rustc_target::abi::Abi::ScalarPair(_, _) = layout.abi { CPlace::new_var_pair(fx, local, layout) |
