|
|
|
|
|
by lytigas
2493 days ago
|
|
Regardless of what exactly rustc does right now, in the future Rust's strict aliasing rules will basically ensure Rust does this optimization in every possible case, because Rust reasons at compile time to ensure no mutable references ever alias. Things have been held up for a while on this LLVM bug, though[0]. [0] https://github.com/rust-lang/rust/issues/54878 |
|