Skip to content

Commit 9ca82a9

Browse files
committed
Fix ICE on unsized locals
Fixes #1312
1 parent a501d96 commit 9ca82a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/abi/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ fn make_local_place<'tcx>(
161161
layout: TyAndLayout<'tcx>,
162162
is_ssa: bool,
163163
) -> CPlace<'tcx> {
164+
if layout.is_unsized() {
165+
fx.tcx.sess.span_fatal(
166+
fx.mir.local_decls[local].source_info.span,
167+
"unsized locals are not yet supported",
168+
);
169+
}
164170
let place = if is_ssa {
165171
if let rustc_target::abi::Abi::ScalarPair(_, _) = layout.abi {
166172
CPlace::new_var_pair(fx, local, layout)

0 commit comments

Comments
 (0)