Hacker News new | ask | show | jobs
by jakobnissen 864 days ago
That's not right, Rust only checks for overflow in release mode for numbers where its value is known at compile time. In debug mode all operations are checked for overflow.
2 comments

Integer overflows can be enabled in release mode by modifying your Cargo.toml with

    [profile.release]
    overflow-checks = true
IMO it should have been the default.
Aahh, my bad. TIL.