Re:Rust's 2019 Roadmap
by est31 on Tuesday April 23, 2019 @01:14PM
(#19730679)
In other Rusty news, two phase borrows just got enabled on nightly but stable Rust in the 2015 edition: https://github.com/rust-lang/rust/pull/59114. If not backed out, it will most likely be part of the 1.36 release. This is a milestone of maturity for the new borrow checker: they had a ticket with multiple blocker bugs before they chose to enable it on the 2015 "stability" edition as well: https://github.com/rust-lang/rust/issues/57804
[ Parent
| on HN ]
Unless I'm wrong, this is NLL, not two phase borrows (which may contain two phase borrows). But considering two phase borrows are still a problem for the memory model, they might actually somewhat unstabilize them to a certain degree again (I haven't checked on what they decided regarding that).
Not a borrow checker expert, but this PR was on the blocker list. Maybe it's what you mean? https://github.com/rust-lang/rust/pull/58739
Since the new borrow checker is maturing, people are working on the new new borrow checker: https://github.com/rust-lang/polonius
For those wondering, the "new new borrow checker" is similar to its predecessor in that it operates on the compiler's MIR, but is a different and slightly more complete algorithm (it accepts a strict superset of code, thus backwards compatible). This two-step rollout was decided last year due to (at the time) some unacceptable compile-time regressions in the new-new algorithm's implementation. Read about it here: http://smallcultfollowing.com/babysteps/blog/2018/06/15/mir-...
Re:Rust's 2019 Roadmap
by atombender on Tuesday April 23, 2019 @01:34PM
(#19730895)
Is there a document anywhere explaining what this change means in practice?
The change was part of the 2018 edition already, so is covered in the 2018 book: https://doc.rust-lang.org/edition-guide/rust-2018/ownership-...
As an experienced Rust developer I can usually deal with the borrow checker, but sometimes I'm still annoyed by its limitations or hit them without expecting to hit them. Most of the times this happens it's either because I want to partially access a struct in a closure, or do something that's now allowed by NLL. So this is a big deal.