3 ms·
> the UB described here is the same in Rust I don't think this is correct. Dividing by zero in Rust produces a panic, and panics are observable side effects th
by oconnor663 8y ago
> the UB described here is the same in Rust
I don't think this is correct. Dividing by zero in Rust produces a panic, and panics are observable side effects that may not be reordered with other side effects. This is sometimes annoying, because it can prevent the compiler from eliminating bounds checks in some cases, but it avoids the problems mentioned in this article.