Reducing Raw Pointer Footguns: Preventing Reference Aliasing Violations at Compile Time
Rust Internals [Unofficial]
May 15, 2026
fuji-184:
It isn't for checking aliasing rules for raw pointers, because raw pointers themselves don't have aliasing rules
If you want to dereference a raw pointer, even without materializing a reference, there are still aliasing rules you need to follow. They're just looser and finer-grained than the rules for & and &mut references. A write through one raw pointer can still invalidate other raw pointers (such that reading or writing through those pointers would be UB). (See the std::ptr module's docs.)
fuji-184:
My motivation for creating this is that many people say unsafe Rust is difficult because of the aliasing rules.
In part no doubt because Rust hasn't fully defined its aliasing rules yet. Seems to be several years out still.
Discussion in the ATmosphere