Skip to content

Update polonius-engine to 0.13.0 #87738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 18, 2021
Merged

Update polonius-engine to 0.13.0 #87738

merged 11 commits into from
Aug 18, 2021

Conversation

lqd
Copy link
Member

@lqd lqd commented Aug 3, 2021

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:

  • 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

lqd added 11 commits August 3, 2021 20:29
and update fact generation to the new relation names
These 2 tests are ignored in the NLL compare-mode, and are ignored in
the polonius compare-mode for the same reasons.
These are all about reaching some type and recursion limits and saving
the full type in a file, whose folder changes in this compare-mode.
The error output is now the same as the others, no need to bless
anything.
Only some simple diagnostic changes happened, and rustfmt-ing.
The diagnostics are different from the NLL ones but the same errors are
emitted.
The diagnostics are either the same or better than NLLs: an error that
is seen in the compare-mode, but not visible in the NLL output (probably
because of early return in case of error) is visible in the polonius
output.

A duplicate error is emitted because of a suggestion on the universal
regions.
This test is ignored in the NLL compare-mode and manually checks the NLL
output. This makes the polonius compare-mode fail, even though the
output is the same as NLL.
Polonius also emits the error that NLL doesn't get a chance to: see comment
"Borrowck doesn't get a chance to run, but if it did it should error here."
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 3, 2021
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 17, 2021

📌 Commit f2a4d7f has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2021
@bors
Copy link
Collaborator

bors commented Aug 18, 2021

⌛ Testing commit f2a4d7f with merge 679dea4...

@bors
Copy link
Collaborator

bors commented Aug 18, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 679dea4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 18, 2021
@bors bors merged commit 679dea4 into rust-lang:master Aug 18, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 18, 2021
@lqd lqd deleted the polonius-master branch August 18, 2021 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants