Update based on wesleywiser review
This commit is contained in:
parent
9d6ce61376
commit
e742f809f6
4 changed files with 15 additions and 8 deletions
|
@ -467,9 +467,9 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
|
|||
let val = match null_op {
|
||||
NullOp::SizeOf => layout.size.bytes(),
|
||||
NullOp::AlignOf => layout.align.abi.bytes(),
|
||||
NullOp::OffsetOf(fields) => layout
|
||||
.offset_of_subfield(&self.ecx, fields.iter().map(|f| f.index()))
|
||||
.bytes(),
|
||||
NullOp::OffsetOf(fields) => {
|
||||
layout.offset_of_subfield(&self.ecx, fields.iter()).bytes()
|
||||
}
|
||||
};
|
||||
let usize_layout = self.ecx.layout_of(self.tcx.types.usize).unwrap();
|
||||
let imm = ImmTy::try_from_uint(val, usize_layout)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue