|
|
|
|
|
by steveklabnik
2230 days ago
|
|
The practical benefit is not in the wrapping specifically. The difference is in it being UB vs not UB; that is, overflow is a "program error" not UB, and so the language defines how implementations must handle this error. You aren't supposed to rely on this semantic, as it's an error. If the checks get cheap enough, rustc will also check in release. |
|