@@ -166,7 +166,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
166
166
dependency_format. 1 . iter ( ) . enumerate ( ) . filter_map ( |( num, & linkage) | {
167
167
// We add 1 to the number because that's what rustc also does everywhere it
168
168
// calls `CrateNum::new`...
169
- #[ allow( clippy:: integer_arithmetic ) ]
169
+ #[ allow( clippy:: arithmetic_side_effects ) ]
170
170
( linkage != Linkage :: NotLinked ) . then_some ( CrateNum :: new ( num + 1 ) )
171
171
} ) ,
172
172
) {
@@ -707,7 +707,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
707
707
. position ( |& c| c == val)
708
708
{
709
709
let idx = u64:: try_from ( idx) . unwrap ( ) ;
710
- #[ allow( clippy:: integer_arithmetic ) ] // idx < num, so this never wraps
710
+ #[ allow( clippy:: arithmetic_side_effects ) ] // idx < num, so this never wraps
711
711
let new_ptr = ptr. offset ( Size :: from_bytes ( num - idx - 1 ) , this) ?;
712
712
this. write_pointer ( new_ptr, dest) ?;
713
713
} else {
@@ -916,10 +916,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
916
916
let a = this. read_scalar ( a) ?. to_u64 ( ) ?;
917
917
let b = this. read_scalar ( b) ?. to_u64 ( ) ?;
918
918
919
- #[ allow( clippy:: integer_arithmetic ) ]
919
+ #[ allow( clippy:: arithmetic_side_effects ) ]
920
920
// adding two u64 and a u8 cannot wrap in a u128
921
921
let wide_sum = u128:: from ( c_in) + u128:: from ( a) + u128:: from ( b) ;
922
- #[ allow( clippy:: integer_arithmetic ) ] // it's a u128, we can shift by 64
922
+ #[ allow( clippy:: arithmetic_side_effects ) ] // it's a u128, we can shift by 64
923
923
let ( c_out, sum) = ( ( wide_sum >> 64 ) . truncate :: < u8 > ( ) , wide_sum. truncate :: < u64 > ( ) ) ;
924
924
925
925
let c_out_field = this. place_field ( dest, 0 ) ?;
0 commit comments