]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #87738 - lqd:polonius-master, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 18 Aug 2021 05:50:55 +0000 (05:50 +0000)
committerbors <bors@rust-lang.org>
Wed, 18 Aug 2021 05:50:55 +0000 (05:50 +0000)
commit679dea4cc3fbddc6717cc9ee2b5f906f1e538df6
tree816942aac4f51ac8d357052a026be73e672dd4a7
parentcbe3afece59d85a53b9c7e085c1426c9bac2b526
parentf2a4d7fdbe4fd5b91632c30cf67ea7f3249a3030
Auto merge of #87738 - lqd:polonius-master, r=nikomatsakis

Update `polonius-engine` to 0.13.0

This PR updates the use of `polonius-engine` to the recently released 0.13.0:
- this version renamed a lot of relations to match the current terminology
- "illegal subset relationships errors" (AKA "subset errors" or "universal region errors" in rustc parlance) have been implemented in all variants, and therefore the `Hybrid` variant can be the rustc default once again
- some of the blessed expectations were updated: new tests have been added since the last time I updated the tests, diagnostics have changed, etc.

In particular:
- a few tests had trivial expectations changes such as basic diagnostics changes for the migrate-mode and full NLLs
- others were recursion and lengths limits which emits a file, and under the polonius compare-mode, the folder has a different name
- a few tests were ignored in the NLL compare-mode for reasons that obviously also apply to Polonius
- some diagnostics were unified so that older expectations no longer made sense: the NLL and Polonius outputs were identical.
- in a few cases Polonius gets a chance to emit more errors than NLLs

A few tests in the compare-mode still are super slow and trigger the 60s warning, or OOM rustc during fact generation, and I've detailed these [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/Challenges.20for.20move.2Finit.2C.20liveness.2C.20and.20.60Location.3A.3AAll.60):
- `src/test/ui/numbers-arithmetic/saturating-float-casts.rs` -> OOM during rustc fact generation
- `src/test/ui/numbers-arithmetic/num-wrapping.rs`
- `src/test/ui/issues/issue-72933-match-stack-overflow.rs`
- `src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs`
- `src/test/ui/repr/repr-no-niche.rs`

In addition, 2 tests don't currently pass and I didn't want to bless them now: they deal with HRTBs and miss errors that NLLs emit. We're currently trying to see if we need chalk to deal with HRTB errors (as we thought we would have to) but during the recent sprint, we discovered that we may be able to detect some of these errors in a way that resembles subset errors:
- `ui/hrtb/hrtb-just-for-static.rs` -> 3 errors in NLL, 2 in polonius: a missing error about HRTB + needing to outlive 'static
- `ui/issues/issue-26217.rs` -> missing HRTB that makes the test compile instead of emitting an error

We'll keep talking about this at the next sprint as well.

cc `@rust-lang/wg-polonius` r? `@nikomatsakis`
Cargo.lock
compiler/rustc_mir/src/borrow_check/facts.rs
compiler/rustc_mir/src/borrow_check/nll.rs
compiler/rustc_mir/src/borrow_check/type_check/mod.rs
src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr