File tree 1 file changed +2
-0
lines changed
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1000,6 +1000,7 @@ fn mask_load<'tcx>(
1000
1000
let dest = this. project_index ( & dest, i) ?;
1001
1001
1002
1002
if this. read_scalar ( & mask) ?. to_uint ( mask_item_size) ? >> high_bit_offset != 0 {
1003
+ #[ allow( clippy:: arithmetic_side_effects) ] // `Size` arithmetic is checked
1003
1004
let ptr = ptr. wrapping_offset ( dest. layout . size * i, & this. tcx ) ;
1004
1005
// Unaligned copy, which is what we want.
1005
1006
this. mem_copy ( ptr, dest. ptr ( ) , dest. layout . size , /*nonoverlapping*/ true ) ?;
@@ -1035,6 +1036,7 @@ fn mask_store<'tcx>(
1035
1036
if this. read_scalar ( & mask) ?. to_uint ( mask_item_size) ? >> high_bit_offset != 0 {
1036
1037
// *Non-inbounds* pointer arithmetic to compute the destination.
1037
1038
// (That's why we can't use a place projection.)
1039
+ #[ allow( clippy:: arithmetic_side_effects) ] // `Size` arithmetic is checked
1038
1040
let ptr = ptr. wrapping_offset ( value. layout . size * i, & this. tcx ) ;
1039
1041
// Deref the pointer *unaligned*, and do the copy.
1040
1042
let dest = this. ptr_to_mplace_unaligned ( ptr, value. layout ) ;
You can’t perform that action at this time.
0 commit comments