Polonius, Rust's new and improved borrow-checker, is nearing stabilization in nightly Rust. The current borrow-checker is overly conservative, rejecting valid memory-safe code due to imprecise lifetime tracking — for example, incorrectly extending mutable reference lifetimes across match arms. Polonius fixes this by more accurately determining when references overlap, allowing more valid code to compile without sacrificing memory safety. Testing on 20,000 popular crates showed an average compile time increase of just 1.4%, with 75% of cases seeing under 2% regression. Based on recent progress, Polonius could land in nightly Rust within 3–6 months, pending soundness fixes and performance validation.

5m watch time
232.2K Impressions4 Comments