forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#64554 - lqd:polonius_tests4, r=nikomatsakis
Polonius: more `ui` test suite fixes Since rust-lang#62736, new tests have been added, and the `run-pass` suite was merged into the `ui` suite. This PR adds the missing tests expectations for Polonius, and updates the existing ones where the NLL output has changed in some manner (e.g. ordering of notes) Those are the trivial cases, but a more-detailed explanation is available [in this write-up](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?both#26-async-awaitasync-borrowck-escaping-closure-errorrs-outputs-from-NLL-Polonius-diff) starting at test case 26: they are only differing in diagnostics and instances of other existing test cases differences. Only 3 of the 9020 tests are still "failing" at the moment (1 failure, 2 OOMs). r? @nikomatsakis
- Loading branch information
Showing
5 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/test/ui/async-await/async-borrowck-escaping-closure-error.polonius.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error[E0597]: `x` does not live long enough | ||
--> $DIR/async-borrowck-escaping-closure-error.rs:5:24 | ||
| | ||
LL | Box::new((async || x)()) | ||
| -------------------^---- | ||
| | | | | ||
| | | borrowed value does not live long enough | ||
| | value captured here | ||
| borrow later used here | ||
LL | | ||
LL | } | ||
| - `x` dropped here while still borrowed | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
16 changes: 16 additions & 0 deletions
16
src/test/ui/borrowck/return-local-binding-from-desugaring.polonius.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error[E0716]: temporary value dropped while borrowed | ||
--> $DIR/return-local-binding-from-desugaring.rs:26:18 | ||
| | ||
LL | for ref x in xs { | ||
| ^^ creates a temporary which is freed while still in use | ||
... | ||
LL | } | ||
| - temporary value is freed at the end of this statement | ||
LL | result | ||
| ------ borrow later used here | ||
| | ||
= note: consider using a `let` binding to create a longer lived value | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0716`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"artifact":"$TEST_BUILD_DIR/json-multiple.polonius/libjson_multiple.rlib","emit":"link"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"artifact":"$TEST_BUILD_DIR/json-options.polonius/libjson_options.rlib","emit":"link"} |