Skip to content

Commit ed15716

Browse files
committed
Configure clippy not to generate warnings about arithmetic operations on rustc_target::abi::Size
1 parent 799a4de commit ed15716

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/tools/miri/clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
arithmetic-side-effects-allowed = ["rustc_target::abi::Size"]

src/tools/miri/src/shims/x86/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,6 @@ fn mask_load<'tcx>(
985985
let dest = this.project_index(&dest, i)?;
986986

987987
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
988-
// Size * u64 is implemented as always checked
989-
#[allow(clippy::arithmetic_side_effects)]
990988
let ptr = ptr.wrapping_offset(dest.layout.size * i, &this.tcx);
991989
// Unaligned copy, which is what we want.
992990
this.mem_copy(ptr, dest.ptr(), dest.layout.size, /*nonoverlapping*/ true)?;
@@ -1020,8 +1018,6 @@ fn mask_store<'tcx>(
10201018
let value = this.project_index(&value, i)?;
10211019

10221020
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
1023-
// Size * u64 is implemented as always checked
1024-
#[allow(clippy::arithmetic_side_effects)]
10251021
let ptr = ptr.wrapping_offset(value.layout.size * i, &this.tcx);
10261022
// Unaligned copy, which is what we want.
10271023
this.mem_copy(value.ptr(), ptr, value.layout.size, /*nonoverlapping*/ true)?;

0 commit comments

Comments
 (0)