Skip to content

Commit 9acb9fa

Browse files
committed
Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commit e108481, reversing changes made to 303e8bd.
1 parent 14b00fb commit 9acb9fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/base.rs

+6
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,12 @@ fn codegen_stmt<'tcx>(
828828
fx.bcx.ins().nop();
829829
}
830830
}
831+
Rvalue::Len(place) => {
832+
let place = codegen_place(fx, place);
833+
let usize_layout = fx.layout_of(fx.tcx.types.usize);
834+
let len = codegen_array_len(fx, place);
835+
lval.write_cvalue(fx, CValue::by_val(len, usize_layout));
836+
}
831837
Rvalue::ShallowInitBox(ref operand, content_ty) => {
832838
let content_ty = fx.monomorphize(content_ty);
833839
let box_layout = fx.layout_of(Ty::new_box(fx.tcx, content_ty));

0 commit comments

Comments
 (0)