News for hackers. Stuff that matters.
Re:Announcing Rust 1.30 by bsaul on Thursday October 25, 2018 @01:08PM (#18302465)
Just out of curiosity : what are the next big features related to the borrow / ownership management ? I've always heard that was rust main pain point, so i'm wondering what are the Rust devs main long-term improvements on that matter.
Re:Announcing Rust 1.30 by shepmaster on Thursday October 25, 2018 @01:10PM (#18302478)
Non-lexical lifetimes [0] are scheduled to be enabled in the Rust 2018 edition, which will be the default edition as of Rust 1.31, the next release.

After that, there's still some work that can be done towards NLL, specifically some details around how borrowing across functions works when the compiler "should" know that there actually isn't a borrow. This is part of some work codenamed "Polonius" [1], which should also improve the compiler time required to apply the borrow checker's rules.

[0]: https://stackoverflow.com/q/50251487/155423

[1]: https://github.com/rust-lang-nursery/polonius

Re:Announcing Rust 1.30 by hinoki on Thursday October 25, 2018 @01:30PM (#18302661)
I think Polonius is such a great name for that project. For those who didn't read Shakespeare's Hamlet, Polonius is known for giving the advice "Neither a borrower nor a lender be."
Re:Announcing Rust 1.30 by gpm on Thursday October 25, 2018 @01:27PM (#18302625)
Is NLL going to be tied to Rust 2018 now? As someone who has been programming with #![feature(nll)] for a long time that would be unfortunate...
Re:Announcing Rust 1.30 by mark-simulacrum on Thursday October 25, 2018 @01:52PM (#18302900)
For the initial release, NLL will be enabled in "migration" mode in 2018 only. `#![feature(nll)]` will continue to be available -- that hard-enables MIR borrowck instead of the migration mode. (edit: to be clear, the feature gate is not stabilized, but it will be available on nightly)

Migration mode means that the MIR borrow check will run, and if it errors, then AST borrow check will run, and if that compiles successfully then the MIR borrow check errors will be downgraded to warnings. If MIR borrow check is successful then AST borrow check does not run and its errors will not impact the results.

Eventually we will enable MIR borrowck fully on all editions; I personally hope this happens sooner rather than later so we can delete the old code, but we have no concrete timeline just yet.