wrapping_sub

Function wrapping_sub 

Source
pub open spec fn wrapping_sub(x: i32, y: i32) -> i32
Expand description
{
    if x - y > <i32>::MAX {
        (x - y - 0x1_0000_0000) as i32
    } else if x - y < <i32>::MIN {
        (x - y + 0x1_0000_0000) as i32
    } else {
        (x - y) as i32
    }
}