]> git.lizzy.rs Git - rust.git/commit
Auto merge of #49836 - nikomatsakis:nll-facts-prep, r=pnkfelix
authorbors <bors@rust-lang.org>
Tue, 17 Apr 2018 14:23:57 +0000 (14:23 +0000)
committerbors <bors@rust-lang.org>
Tue, 17 Apr 2018 14:23:57 +0000 (14:23 +0000)
commit881a7cd86ef1001bdfa9590878ca24e57794302f
tree947639046e0b0f2a1ddc5d0ad6d6f4e33040ff44
parentd703622ce08d51eb91a909278f7917762e743438
parent96dba9358c5ad24bc33eeb3a9a39a4868c331bcf
Auto merge of #49836 - nikomatsakis:nll-facts-prep, r=pnkfelix

prep work for using timely dataflow with NLL

Two major changes:

**Two-phase borrows are overhauled.** We no longer have two bits per borrow. Instead, we track -- for each borrow -- an (optional) "activation point". Then, for each point P where the borrow is in scope, we check where P falls relative to the activation point. If P is between the reservation point and the activation point, then this is the "reservation" phase of the borrow, else the borrow is considered active. This is simpler and means that the dataflow doesn't have to care about 2-phase at all, at last not yet.

**We no longer support using the MIR borrow checker without NLL.** It is going to be increasingly untenable to support lexical mode as we go forward, I think, and also of increasingly little value. This also exposed a few bugs in NLL mode due to increased testing.

r? @pnkfelix
cc @bobtwinkles
src/librustc/session/config.rs
src/librustc/ty/context.rs
src/librustc_mir/borrow_check/mod.rs
src/librustc_mir/borrow_check/nll/type_check/mod.rs
src/tools/compiletest/src/runtest.rs