Skip to content

Commit 7df0b72

Browse files
committed
Use immediate_backend_type
1 parent 9b0749d commit 7df0b72

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
528528
PassMode::Direct(_) | PassMode::Pair(..) => {
529529
let op = self.codegen_consume(bx, mir::Place::return_place().as_ref());
530530
match op.val {
531-
Uninit => bx.const_undef(bx.backend_type(self.fn_abi.ret.layout)),
531+
Uninit => bx.const_undef(bx.immediate_backend_type(op.layout)),
532532
Ref(place_val) => bx.load_from_place(bx.backend_type(op.layout), place_val),
533533
_ => op.immediate_or_packed_pair(bx),
534534
}

0 commit comments

Comments
 (0)