Skip to content
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

Add better error message for partial move #58199

Merged
merged 7 commits into from
Feb 23, 2019
Merged

Add better error message for partial move #58199

merged 7 commits into from
Feb 23, 2019

Conversation

clintfred
Copy link
Contributor

closes #56657

r? @davidtwco

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 5, 2019
@clintfred
Copy link
Contributor Author

I have several tests failing on my branch, but am hoping this PR will allow others to help me move forward.

@davidtwco
Copy link
Member

@clintfred Excited to see this PR! Could you update those test outputs and add them to the PR so that we can see what outputs you are getting and add review comments with steps to take?

@clintfred
Copy link
Contributor Author

@clintfred Excited to see this PR! Could you update those test outputs and add them to the PR so that we can see what outputs you are getting and add review comments with steps to take?

@davidtwco I'm not sure I understand your request. Won't we see the failing tests when CI runs? Or does it run only some intelligent subset of the tests based on what's changed?

@davidtwco
Copy link
Member

davidtwco commented Feb 5, 2019

@clintfred We will, but it's easier to put review comments and have discussions on your changes than the test results.

@estebank
Copy link
Contributor

estebank commented Feb 6, 2019

@clintfred you can run ./x.py test src/test/ui --stage 1 --bless, which will update the .stderr files. After doing that I think the PR can be approved. You can see the current test errors in Travis (they all seem to be stderr output mismatch and nothing else).

@clintfred
Copy link
Contributor Author

@estebank I think that's the same set of failures I was seeing on my machine, so that's a good sign. When reviewing them on my own, it wasn't clear to me that all of those error messages were correct after my change. I will look again, but I would appreciate confirmation from others that they look correct as well.

I will run with --bless so we can get all the files into this PR regardless per @davidtwco's instructions.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great. Here are some small changes.

src/test/ui/borrowck/borrowck-describe-lvalue.mir.stderr Outdated Show resolved Hide resolved
src/librustc_mir/borrow_check/error_reporting.rs Outdated Show resolved Hide resolved
src/test/ui/borrowck/borrowck-issue-48962.stderr Outdated Show resolved Hide resolved
@clintfred
Copy link
Contributor Author

I have implemented the suggested changes. Some tests will start failing again and hopefully they will be all the tests that were previously erroneously marked as partial moves... If so, I can rerun the --bless

@estebank
Copy link
Contributor

@davidtwco
Copy link
Member

travis-ci.com/rust-lang/rust/jobs/177505407#L2819

A quick glance makes me think that these are all correct. Feel free to bless and push @clintfred.

@estebank estebank changed the title [WIP] Add better error message for partial move Add better error message for partial move Feb 18, 2019
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 18, 2019

📌 Commit de05548 has been approved by estebank

@bors
Copy link
Contributor

bors commented Feb 18, 2019

🌲 The tree is currently closed for pull requests below priority 160, this pull request will be tested once the tree is reopened

@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 Feb 18, 2019
@estebank
Copy link
Contributor

Oh, sorry, didn't realize that you were the reviewer, @davidtwco. Feel free to r- if you disagree.

@davidtwco
Copy link
Member

Oh, sorry, didn't realize that you were the reviewer, @davidtwco. Feel free to r- if you disagree.

No worries, this looks great! Thanks @clintfred!

@kennytm
Copy link
Member

kennytm commented Feb 19, 2019

@bors r- rollup-

Failed in NLL mode in #58566 (comment). Needs to update the text (bless) these 6 test cases:

[01:30:22] failures:
[01:30:22]     [ui (nll)] ui/borrowck/borrowck-uninit-field-access.rs#ast
[01:30:22]     [ui (nll)] ui/moves/moves-based-on-type-cyclic-types-issue-4821.rs
[01:30:22]     [ui (nll)] ui/moves/moves-based-on-type-match-bindings.rs
[01:30:22]     [ui (nll)] ui/ref-suggestion.rs
[01:30:22]     [ui (nll)] ui/unsized-locals/borrow-after-move.rs
[01:30:22]     [ui (nll)] ui/unsized-locals/double-move.rs

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 19, 2019
@clintfred
Copy link
Contributor Author

@kennytm I'll take a look.

@estebank
Copy link
Contributor

I think all you have to do is run the same ./x.py ... --bless command with --compare-mode=nll to update these files.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 20, 2019
@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 20, 2019

📌 Commit 02fe6a7 has been approved by estebank

@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 Feb 20, 2019
@estebank
Copy link
Contributor

@bors rollup-

@clintfred
Copy link
Contributor Author

@estebank I'm not sure of the status here. Do I need to do anything?

@estebank
Copy link
Contributor

@clintfred not for the moment, I removed the rollup because this has the potential to clash with other PRs that incorporate partial move errors. Because the stderr files would be new, and generated from a parent commit that didn't have your changes there would be no merge conflict, but the tests would fail because of the discrepancy between both changes. This PR is still approved and will be merged on its own. There's the potential of a different PR being merged in the meantime that will necessitate you to rebase and re-bless, but no other action will be required of you.

Thank you for all the effort you've put into this! These small incremental improvements add up and are critical to maintaining the quality we want to see in rustc.

Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
…stebank

Add better error message for partial move

closes rust-lang#56657

r? @davidtwco
Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
…stebank

Add better error message for partial move

closes rust-lang#56657

r? @davidtwco
Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
…stebank

Add better error message for partial move

closes rust-lang#56657

r? @davidtwco
Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
…stebank

Add better error message for partial move

closes rust-lang#56657

r? @davidtwco
Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
…stebank

Add better error message for partial move

closes rust-lang#56657

r? @davidtwco
bors added a commit that referenced this pull request Feb 23, 2019
Rollup of 16 pull requests

Successful merges:

 - #58100 (Transition librustdoc to Rust 2018)
 - #58122 (RangeInclusive internal iteration performance improvement.)
 - #58199 (Add better error message for partial move)
 - #58227 (Updated RELEASES.md for 1.33.0)
 - #58353 (Check the Self-type of inherent associated constants)
 - #58453 (SGX target: fix panic = abort)
 - #58476 (Remove `LazyTokenStream`.)
 - #58526 (Special suggestion for illegal unicode curly quote pairs)
 - #58595 (Turn duration consts into associated consts)
 - #58609 (Allow Self::Module to be mutated.)
 - #58628 (Optimise vec![false; N] to zero-alloc)
 - #58643 (Don't generate minification variables if minification disabled)
 - #58648 (Update tests to account for cross-platform testing and miri.)
 - #58654 (Do not underflow after resetting unmatched braces count)
 - #58658 (Add expected/provided byte alignments to validation error message)
 - #58667 (Reduce Miri-related Code Repetition `like (n << amt) >> amt`)

Failed merges:

r? @ghost
@bors bors merged commit 02fe6a7 into rust-lang:master Feb 23, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NLL Diagnostic Review 3: missing indication that a "partial move" has occurred
7 participants