From 8431ed8713d1fe4d8bb6377c28cbf7e18d3c3b17 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 31 Oct 2024 08:14:56 +0100 Subject: [PATCH] silence clippy --- src/shims/x86/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shims/x86/mod.rs b/src/shims/x86/mod.rs index e2b02873ae..2f63876327 100644 --- a/src/shims/x86/mod.rs +++ b/src/shims/x86/mod.rs @@ -1000,6 +1000,7 @@ 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 { + #[allow(clippy::arithmetic_side_effects)] // `Size` arithmetic is checked 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)?; @@ -1035,6 +1036,7 @@ fn mask_store<'tcx>( if this.read_scalar(&mask)?.to_uint(mask_item_size)? >> high_bit_offset != 0 { // *Non-inbounds* pointer arithmetic to compute the destination. // (That's why we can't use a place projection.) + #[allow(clippy::arithmetic_side_effects)] // `Size` arithmetic is checked let ptr = ptr.wrapping_offset(value.layout.size * i, &this.tcx); // Deref the pointer *unaligned*, and do the copy. let dest = this.ptr_to_mplace_unaligned(ptr, value.layout);