]> git.lizzy.rs Git - rust.git/commit
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)
commit8876906867b2db3c7177d69dd020c40d89177f86
treed93b3ac7cc723ebb2fb30ef4985dbe192c25c5c4
parentf1694eac74216da22b395a5589b8d080ccd5a2ec
parent610903fb118cb7cbf1474bd6cf11ae8afa380c4e
Auto merge of #54468 - matthewjasper:fix-polonius, r=nikomatsakis

[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
src/librustc_mir/borrow_check/nll/invalidation.rs