]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #54468 - matthewjasper:fix-polonius, r=nikomatsakis
authorbors <bors@rust-lang.org>
Thu, 27 Sep 2018 19:26:59 +0000 (19:26 +0000)
committerbors <bors@rust-lang.org>
Thu, 27 Sep 2018 19:26:59 +0000 (19:26 +0000)
[NLL] Get Polonius borrow check to work in simple cases

* Restores the generation of outlives facts from subtyping.
* Restore liveness facts.
* Generate invalidates facts at the start point of each location,
  where we check for errors.
* Add a small test for simple cases (previously these cases have compiled, and more recently ICEd).

Closes #54212
cc #53142 (will need test)

### Known limitations

* Two phase borrows aren't implemented for Polonius yet
* Invalidation facts haven't been updated for some of the recent changes to make `Drop` terminators access fewer things.
* Fact generation is not as optimized as it could be.
* Around 30 tests fail in compare mode, often tests that are ignored in nll compare mode

r? @nikomatsakis

1  2 
src/librustc_mir/borrow_check/nll/invalidation.rs