Skip to content

Commit 8431ed8

Browse files
committed
silence clippy
1 parent b754f1b commit 8431ed8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shims/x86/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ fn mask_load<'tcx>(
10001000
let dest = this.project_index(&dest, i)?;
10011001

10021002
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
1003+
#[allow(clippy::arithmetic_side_effects)] // `Size` arithmetic is checked
10031004
let ptr = ptr.wrapping_offset(dest.layout.size * i, &this.tcx);
10041005
// Unaligned copy, which is what we want.
10051006
this.mem_copy(ptr, dest.ptr(), dest.layout.size, /*nonoverlapping*/ true)?;
@@ -1035,6 +1036,7 @@ fn mask_store<'tcx>(
10351036
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
10361037
// *Non-inbounds* pointer arithmetic to compute the destination.
10371038
// (That's why we can't use a place projection.)
1039+
#[allow(clippy::arithmetic_side_effects)] // `Size` arithmetic is checked
10381040
let ptr = ptr.wrapping_offset(value.layout.size * i, &this.tcx);
10391041
// Deref the pointer *unaligned*, and do the copy.
10401042
let dest = this.ptr_to_mplace_unaligned(ptr, value.layout);

0 commit comments

Comments
 (0)