3 ms·
> Ugh if you read the article, you would know that the UB described here is the same in Rust. Rust doesn't have a formal memory model yet, but it's already kno
by newacctjhro 8y ago
> Ugh if you read the article, you would know that the UB described here is the same in Rust.
Rust doesn't have a formal memory model yet, but it's already known that UB in Rust is quite restricted:
https://doc.rust-lang.org/nomicon/what-unsafe-does.html https://doc.rust-lang.org/nomicon/what-unsafe-does.html
Most importantly, UB in Rust should only arise if you're writing unsafe code (barring compiler bugs). Typically, most Rust code is safe. This is a huge win.