Y
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
estebank
863 days ago
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.
link
FridgeSeal
863 days ago
Aahh, my bad. TIL.
link