Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
jakobnissen
2y ago
0 comments
Save
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
2 comments · 2 top-level
top
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