Behavior not considered unsafe
This is a list of behavior not considered unsafe in Rust terms, but that may be undesired.
- Leaks of memory and other resources
- Exiting without calling destructors
- Integer overflow
- Overflow is considered "unexpected" behavior and is always user-error,
wrappingprimitives 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.
- Overflow is considered "unexpected" behavior and is always user-error, unless the