Skip to content

Commit 5b6e747

Browse files
Nicer ICE for #67981
1 parent 1c42cb4 commit 5b6e747

File tree

1 file changed

+11
-1
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+11
-1
lines changed

compiler/rustc_codegen_ssa/src/mir/mod.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,17 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
304304
bug!("spread argument isn't a tuple?!");
305305
};
306306

307-
let place = PlaceRef::alloca(bx, bx.layout_of(arg_ty));
307+
let layout = bx.layout_of(arg_ty);
308+
309+
// FIXME: support unsized params in "rust-call" ABI
310+
if layout.is_unsized() {
311+
span_bug!(
312+
arg_decl.source_info.span,
313+
"\"rust-call\" ABI does not support unsized params",
314+
);
315+
}
316+
317+
let place = PlaceRef::alloca(bx, layout);
308318
for i in 0..tupled_arg_tys.len() {
309319
let arg = &fx.fn_abi.args[idx];
310320
idx += 1;

0 commit comments

Comments
 (0)