Conversation

Replying to
There were literally dozens of bugs uncovered in LLVM as part of trying to fix this for Rust. It's also incredibly broken in GCC and it isn't getting fixed there because this incentive doesn't exist. Using restrict is probably a bad idea with either, especially combined with LTO.
1
2
Replying to and
The vast majority of immutable references can also be noalias, particularly all the trivial cases like &u32. It's just not going to be possible until LLVM has a better implementation and the Rust memory model for the superset including unsafe code also needs to be ironed out.
1
Replying to and
Since immutable references in Rust actually mean immutable, not an immutable view of something mutable. The exception is if it uses a form of internal mutability (Cell, RefCell) and those safe abstractions need to be implemented via UnsafeCell so the compiler can be fully aware.