@@ -1943,4 +1943,28 @@ mod verify {
19431943 generate_wrapping_shift_harness ! ( u64 , wrapping_shl, checked_wrapping_shl_u64) ;
19441944 generate_wrapping_shift_harness ! ( u128 , wrapping_shl, checked_wrapping_shl_u128) ;
19451945 generate_wrapping_shift_harness ! ( usize , wrapping_shl, checked_wrapping_shl_usize) ;
1946+
1947+ // `wrapping_shr` proofs
1948+ //
1949+ // Target types:
1950+ // i{8,16,32,64,128,size} and u{8,16,32,64,128,size} -- 12 types in total
1951+ //
1952+ // Target contracts:
1953+ // #[ensures(|result| *result == self >> (rhs & (Self::BITS - 1)))]
1954+ // Target function:
1955+ // pub const fn wrapping_shr(self, rhs: u32) -> Self {
1956+ //
1957+ // This function performs an panic-free bitwise right shift operation.
1958+ generate_wrapping_shift_harness ! ( i8 , wrapping_shr, checked_wrapping_shr_i8) ;
1959+ generate_wrapping_shift_harness ! ( i16 , wrapping_shr, checked_wrapping_shr_i16) ;
1960+ generate_wrapping_shift_harness ! ( i32 , wrapping_shr, checked_wrapping_shr_i32) ;
1961+ generate_wrapping_shift_harness ! ( i64 , wrapping_shr, checked_wrapping_shr_i64) ;
1962+ generate_wrapping_shift_harness ! ( i128 , wrapping_shr, checked_wrapping_shr_i128) ;
1963+ generate_wrapping_shift_harness ! ( isize , wrapping_shr, checked_wrapping_shr_isize) ;
1964+ generate_wrapping_shift_harness ! ( u8 , wrapping_shr, checked_wrapping_shr_u8) ;
1965+ generate_wrapping_shift_harness ! ( u16 , wrapping_shr, checked_wrapping_shr_u16) ;
1966+ generate_wrapping_shift_harness ! ( u32 , wrapping_shr, checked_wrapping_shr_u32) ;
1967+ generate_wrapping_shift_harness ! ( u64 , wrapping_shr, checked_wrapping_shr_u64) ;
1968+ generate_wrapping_shift_harness ! ( u128 , wrapping_shr, checked_wrapping_shr_u128) ;
1969+ generate_wrapping_shift_harness ! ( usize , wrapping_shr, checked_wrapping_shr_usize) ;
19461970}
0 commit comments