Hacker News new | past | comments | ask | show | jobs | submit login

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.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: