Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 888 Bytes

File metadata and controls

18 lines (14 loc) · 888 Bytes

Aliasing and memory model

Brief Summary

Rust's borrow checker enforces some particular aliasing requirements. For example, an &u32 reference is always guaranteed to be valid (dereferenceable) and immutable while it is in active use. Similarly, an &mut reference cannot alias any other active reference. It is less clear how those invariants translate to unsafe code that is using raw pointers.

See also