[][src]Attribute Macro wrapping_arithmetic::wrappit

#[wrappit]

Make addition and multiplication wrapping in the annotated function.

Example

This example is not tested
#[wrapit]
fn oops() -> bool {
    let a: u32 = std::u32::MAX;
    let b: u32 = 2;
    let r = a + b;
    r == 1
}