LANGUAGES Signal 374
Enabling the next iteration of the borrow checker on nightly
Rust’s nightly compiler now enables Polonius Alpha, a flow-sensitive borrow checker intended for stabilization in the coming months.
Engineers writing Rust will soon be able to compile code that today’s borrow checker rejects without unsafe blocks or work-arounds. The change trades compile-time performance for expressiveness, so teams should budget extra CI minutes and profile their own crates before the feature ships in stable.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Polonius Alpha accepts sound code that NLL rejects, notably flow-sensitive reborrows and conditional borrows.
Compile times increase modestly for most crates, but a few workloads see 2 to 3× regressions.
The feature is opt-in on nightly; stabilization is planned once regressions and diagnostics are resolved.
THE READ
What elseif makes of it.
Rust’s borrow checker is gaining flow sensitivity. Today’s NLL implementation treats every borrow as live for the entire scope implied by its lifetime annotation. Polonius Alpha instead tracks liveness per control-flow path, so a borrow returned in one branch need not block mutation in another. The practical consequence is that idiomatic patterns like `get_mut_or_default` compile without requiring `unsafe` or manual refactoring. Engineers can expect fewer false positives, but the new analysis is not a strict superset: some programs that compiled under the original Polonius formulation will now be rejected.
Performance regressions are the primary adoption cost. The Rust team measured the top 10 000 crates and found most regressions below 1 %, but a handful of borrow-heavy crates slow down 2 to 3×. These regressions stem from the additional dataflow facts Polonius must compute; the team is still triaging whether optimizations can claw back some of the lost time. Teams should run their own benchmarks on nightly to quantify the impact before stabilization, especially if they rely on many nested borrows or large data structures.
The feature is currently opt-in on nightly, so engineers can test it without disrupting production builds. Enabling it requires a single flag in `rustc` or `Cargo.toml`. Diagnostics are not yet finalized, so error messages may differ from what NLL produces. The Rust team is soliciting feedback on performance, soundness, and diagnostics; any issues should be reported on GitHub or Zulip. Stabilization is planned once regressions are addressed and diagnostics are polished, likely within the next few months.
Written by elseif from the cluster below · checked for specifics the sources never containedTHE CLUSTER
↗