Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
jakobnissen
2y ago
0 comments
Share
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.
0 comments
default
newest
oldest
estebank
2y 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.
FridgeSeal
2y ago
Aahh, my bad. TIL.
j
/
k
navigate · click thread line to collapse