|
|
|
|
|
by steveklabnik
3377 days ago
|
|
To be extra extra extra clear: 1. Rust specifies that if overflow happens, it is a "program error", but it is well-defined as two's compliment overflow. 2. Rust specifies that in debug builds, overflow must be checked, and panic if it happens. In the future, if overflow checking ever has acceptable overhead, this allows us to say that it must always be checked. But for now, you will get a well-formed result. |
|
Since you would turn them off one at a time explicitly, rather than having a whole set of them disappear implicitly, you would probably also tend to have a policy of requiring a special test suite to really push the limits of any specific safety issue before you would allow yourself to turn that one off.
Obviously, if this occurred to me at first glance, it occurred to the designers, who decided to do it the other way after careful consideration, so I'm just asking why.