News for hackers. Stuff that matters.
Re:Incrementing vectors by lytigas on Tuesday August 27, 2019 @02:14AM (#20806762)
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

Re:Incrementing vectors by yoshuaw on Tuesday August 27, 2019 @07:23AM (#20808360)
Last I heard there's a fair chance that this might be implemented at the MIR level instead, allowing it to be unblocked from the LLVM bug.