3 ms·
Safety means "memory safety". Integer overflow cannot cause memory unsafety directly, and so it's safe. (safe) Rust does not claim to make your code correct, i
by steveklabnik 8y ago
Safety means "memory safety". Integer overflow cannot cause memory unsafety directly, and so it's safe.
(safe) Rust does not claim to make your code correct, it claims that it will not have undefined behavior.
We do care about helping you make your code correct; it will check for overflow and panic at runtime in debug builds. But it's a secondary concern. Memory safety is hard enough!