Apply CR suggestions; add real tracking issue
This commit is contained in:
parent
4bb15b3797
commit
003b954a43
6 changed files with 14 additions and 10 deletions
|
@ -377,6 +377,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
}
|
||||
|
||||
let pointee_layout = self.layout_of(substs.type_at(0))?;
|
||||
// This re-interprets an isize at ret_layout, but we already checked
|
||||
// that if ret_layout is usize, then the result must be non-negative.
|
||||
let val = ImmTy::from_scalar(val, ret_layout);
|
||||
let size = ImmTy::from_int(pointee_layout.size.bytes(), ret_layout);
|
||||
self.exact_div(&val, &size, dest)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue