3 ms·
I know that UB can be useful for optimizations. Where did I assert otherwise? I'm saying that overflow is not undefined in Rust (the very first section of the
by Manishearth 11y ago
I know that UB can be useful for optimizations. Where did I assert otherwise?
I'm saying that overflow is not undefined in Rust (the very first section of the blog post says this). I made this same mistake a few days ago and thought it was undefined (and implementation-defined to panic on debug), but I was wrong. Overflow is well defined in Rust.