A new aliasing model for Rust
Mar. 2023
Tree Borrows is a proposed alternative to Stacked
Borrows that fulfills the same role: to analyse the execution of
Rust code at runtime and define the precise requirements of the aliasing
constraints. When these aliasing constraints are violated, the code is
declared Undefined Behavior (UB). This enables optimizations that would
otherwise be unsound in the presence of unsafe
code.
The current version of Tree Borrows is implemented in the Miri interpreter. Compared to another description, this document is more example-oriented.
noalias
attribute)extern type
and pointer offsets)See also some References. Suggest modifications to this document by opening a pull request.