Skip to content

Commit

Permalink
Nicer ICE for rust-lang#67981
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Apr 26, 2023
1 parent 1c42cb4 commit 5b6e747
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion compiler/rustc_codegen_ssa/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,17 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
bug!("spread argument isn't a tuple?!");
};

let place = PlaceRef::alloca(bx, bx.layout_of(arg_ty));
let layout = bx.layout_of(arg_ty);

// FIXME: support unsized params in "rust-call" ABI
if layout.is_unsized() {
span_bug!(
arg_decl.source_info.span,
"\"rust-call\" ABI does not support unsized params",
);
}

let place = PlaceRef::alloca(bx, layout);
for i in 0..tupled_arg_tys.len() {
let arg = &fx.fn_abi.args[idx];
idx += 1;
Expand Down

0 comments on commit 5b6e747

Please sign in to comment.