-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Update ui tests with respect to NLL #55700
Merged
bors
merged 15 commits into
rust-lang:master
from
pnkfelix:issue-55533-update-ui-tests-wrt-nll
Nov 6, 2018
Merged
Update ui tests with respect to NLL #55700
bors
merged 15 commits into
rust-lang:master
from
pnkfelix:issue-55533-update-ui-tests-wrt-nll
Nov 6, 2018
Conversation
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
Most of the time we want to robustify tests, but in this case this test is deliberately encoding artifacts of AST-borrowck. So instead of adding artificial uses that would obscure the aspects of AST-borrowck that are being tests, we instead use revisions and then mark the cases that apply to NLL as well as AST-borrowck.
This is not strictly necessary to make this test "more robust with respect to NLL"; its just an attempt to narrow the scope of the test and focus on its core.
This is based on the feedback from estebank: """ I believe that test can be removed outright. It'd be impossible for a new change to go through that breaks this kind of output without it being picked up by multiple other `stderr` tests. This is an artifact of the transition period to the "new" output style. """ see: rust-lang#52663 (comment)
This is a variant of `ui/borrowck/borrowck-closures-mut-of-imm.rs` that I used to help identify what changes I needed to make to the latter file in order to recover its instances of E0524 under NLL. (Basically this test includes the changes you'd need to make to `ui/borrowck/borrowck-closures-mut-of-imm.rs` in order to get rid of occurrences of E0596. And then I realized that one needs to add invocations of the closures in order to properly extend the mutable reborrows in a manner such that NLL will roughly match AST-borrowck.)
… compare-mode=nll. NLL has increased precision in its analysis of drop order, and we want the test annotations to deliberately reflect this by having fewer ERROR annotations for NLL than for AST-borrowck. The best way to get this effect is via `// revisions`. As a drive-by, also added uses of all the borrows just to make it clear that NLL isn't somehow sidestepping things by using shorter borrows than you might have otherwise expected. (Of course, the added uses do not make all that much difference since the relevant types all declare `impl Drop` and thus those drops have implicit uses anyway.)
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Nov 5, 2018
r? @davidtwco |
davidtwco
approved these changes
Nov 5, 2018
@bors r+ rollup |
📌 Commit fff9dde has been approved by |
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
Nov 5, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Nov 6, 2018
…s-wrt-nll, r=davidtwco Update ui tests with respect to NLL Fix rust-lang#55533
bors
added a commit
that referenced
this pull request
Nov 6, 2018
Rollup of 11 pull requests Successful merges: - #55490 (resolve: Fix ICE in macro import error recovery) - #55597 (std: Enable usage of `thread_local!` through imports) - #55601 (Fix tracking issue numbers for some unstable features) - #55621 (Add precision for create_dir function) - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux) - #55664 (Make "all possible cases" help message uniform with existing help messages) - #55689 (miri: binary_op_val -> binary_op_imm) - #55694 (Fixes #31076) - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields) - #55700 (Update ui tests with respect to NLL) - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #55533