pointee_info_at() does not need mutable access

This commit is contained in:
Matthias Krüger 2021-11-06 01:03:56 +01:00
parent 0d1754e8bf
commit 592fd2818c

View File

@ -125,7 +125,7 @@ pub fn codegen_statement(&mut self, mut bx: Bx, statement: &mir::Statement<'tcx>
let count = self.codegen_operand(&mut bx, count).immediate();
let pointee_layout = dst_val
.layout
.pointee_info_at(&mut bx, rustc_target::abi::Size::ZERO)
.pointee_info_at(&bx, rustc_target::abi::Size::ZERO)
.expect("Expected pointer");
let bytes = bx.mul(count, bx.const_usize(pointee_layout.size.bytes()));