4 ms·
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
by shepmaster 8y ago
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 https://stackoverflow.com/q/50251487/155423
[1]: https://github.com/rust-lang-nursery/polonius https://github.com/rust-lang-nursery/polonius
- deleted 8y ago[deleted]
- gpm 8y agoIs 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...
- deleted 8y ago[deleted]
- mark-simulacrum 8y agoFor 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.
- hinoki 8y agoI 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."