Tree Borrows is a new framework that enhances the Rust programming language's ownership-based type system by replacing the stack in Stacked Borrows with a tree structure. This change reduces the rejection of valid test cases by 54% and enables additional optimizations, including read-read reorderings, while maintaining most benefits of the original Stacked Borrows. The work was recognized with a Distinguished Paper Award at PLDI'25.
The article discusses the complexities of Rust's borrowing system, particularly focusing on the issues arising from contagious borrows and mutable borrow exclusiveness. It outlines strategies to avoid conflicts with the borrow checker, such as using split borrows, reference counting, and data-oriented design to manage ownership and borrowing effectively.