Urgent.News

What's breaking now, across thousands of outlets.

Tech

Enabling the next iteration of the borrow checker on nightly

Rust's upcoming Polonius Alpha borrow checker will be enabled on nightly to help identify issues before stabilization later in the year. This iteration of the borrow checker, spun out of the NLL effort in 2018, offers flow-sensitive borrow checking of lifetime outlives relationships. Polonius Alpha currently performs equal to or more work than NLL, but has shown few significant compile time regressions when tested on the top ten thousand crates by downloads on crates.io.

Performance regressions, if they occur, are expected to be minor and not impact most users. Polonius Alpha enables features that NLL cannot, such as handling borrow checks for specific scenarios where NLL's flow-insensitive analysis falls short. Users can disable Polonius Alpha by passing the -Zpolonius=off flag to rustc or setting RUSTFLAGS=-Zpolonius=off in their project's .cargo/config.toml file.

The development team will continue to monitor for issues, address performance regressions, and improve documentation before stabilizing the feature by the end of the year.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at blog.rust-lang.org →

More in Tech

More from Saturday 8 August →