๐Aliasing only matters if a reference is aliased with another mutable reference
If the object is immutable (as is the case in purely-functional languages), aliasing does not matter. Analysis is never invalidated because objects do not change, and compiler is free to cache values.
In Rust, mutable references never alias, which is guaranteed by the type system. If you have a read-only reference, it is guaranteed that there is no other write reference to the same object. Therefore, nobody can change the value, so compiler is free to perform optimizations.
See also
In Rust, mut/const references are more about exclusive/shared access. In Rust, values can be modified via shared references, though this is either unsafe or requires a type to be Sync.