mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 08:53:35 +00:00
Configure clippy not to generate warnings about arithmetic operations on rustc_target::abi::Size
This commit is contained in:
parent
799a4ded54
commit
ed15716fe6
1
src/tools/miri/clippy.toml
Normal file
1
src/tools/miri/clippy.toml
Normal file
@ -0,0 +1 @@
|
||||
arithmetic-side-effects-allowed = ["rustc_target::abi::Size"]
|
@ -985,8 +985,6 @@ fn mask_load<'tcx>(
|
||||
let dest = this.project_index(&dest, i)?;
|
||||
|
||||
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
|
||||
// Size * u64 is implemented as always checked
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
let ptr = ptr.wrapping_offset(dest.layout.size * i, &this.tcx);
|
||||
// Unaligned copy, which is what we want.
|
||||
this.mem_copy(ptr, dest.ptr(), dest.layout.size, /*nonoverlapping*/ true)?;
|
||||
@ -1020,8 +1018,6 @@ fn mask_store<'tcx>(
|
||||
let value = this.project_index(&value, i)?;
|
||||
|
||||
if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 {
|
||||
// Size * u64 is implemented as always checked
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
let ptr = ptr.wrapping_offset(value.layout.size * i, &this.tcx);
|
||||
// Unaligned copy, which is what we want.
|
||||
this.mem_copy(value.ptr(), ptr, value.layout.size, /*nonoverlapping*/ true)?;
|
||||
|
Loading…
Reference in New Issue
Block a user