When you’re compiling in release mode with the
--release
flag, Rust does not include checks for integer overflow that cause panics. Instead, if overflow occurs, Rust performs two’s complement wrapping. - The book.
here's my code:
fn main() {
let guess: i8 = "128".parse().expect("ahaa err");;
println!("{guess}");
}
then i run cargo run --release, unfortunately my code is still panicked. Why rust does not performs its complement wrapping?
thank you.