Rust Overflow



examples/types/overflow/src/main.rs
fn main() {
    let mut i: i8 = 126;
    println!("{}", i);
    i += 1;
    println!("{}", i);
    i += 1;
    println!("{}", i);
}

126
127
thread 'main' panicked at 'attempt to add with overflow', examples/intro/overflow.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace