but can you explain exactly what part of Rust's type system provides extrabenefits in terms of optimization over D's type system?
In safe Rust, a reference to mutable data has to be unique [1]. So the optimizer could assume no aliasing as long as the mutable borrow lasts.
[1] https://rustbyexample.com/scope/borrow/alias.html
