3 ms·
https://doc.rust-lang.org/reference.html#behavior-not-considered-unsafe https://doc.rust-lang.org/reference.html#behavior-not-consid... >• Integer overflow >
by microcolonel 11y ago
https://doc.rust-lang.org/reference.html#behavior-not-considered-unsafe https://doc.rust-lang.org/reference.html#behavior-not-consid...
>• Integer overflow
> ◦ Overflow is considered "unexpected" behavior and is always user-error, unless the wrapping primitives are used. In non-optimized builds, the compiler will insert debug checks that panic on overflow, but in optimized builds overflow instead results in wrapped values. See RFC 560 for the rationale and more details.
(also important to note that when they say "RFC 560", they are referring to Rust RFCs and not IETF RFCs)