We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Rvalue::ShallowInitBox
1 parent 208fc42 commit 1b34e2dCopy full SHA for 1b34e2d
src/base.rs
@@ -701,6 +701,13 @@ fn codegen_stmt<'tcx>(
701
let len = codegen_array_len(fx, place);
702
lval.write_cvalue(fx, CValue::by_val(len, usize_layout));
703
}
704
+ Rvalue::ShallowInitBox(ref operand, content_ty) => {
705
+ let content_ty = fx.monomorphize(content_ty);
706
+ let box_layout = fx.layout_of(fx.tcx.mk_box(content_ty));
707
+ let operand = codegen_operand(fx, operand);
708
+ let operand = operand.load_scalar(fx);
709
+ lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
710
+ }
711
Rvalue::NullaryOp(NullOp::Box, content_ty) => {
712
let usize_type = fx.clif_type(fx.tcx.types.usize).unwrap();
713
let content_ty = fx.monomorphize(content_ty);
0 commit comments