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

Don't match on region kinds when reporting NLL errors #52617

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

matthewjasper
Copy link
Contributor

First half (by number of tests affected) of the changes to "does not live long enough".

Now that lexical MIR borrowck is gone, region kinds are always ReVar, so matching on them to change errors does nothing.

Changes "borrowed value only lives until here" to "x is dropped here while still borrowed".

r? @pnkfelix cc @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2018
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 22, 2018

📌 Commit f92791d6cf941b11f4f35e3274d7edbe1aae2ad3 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 Jul 22, 2018
@bors
Copy link
Contributor

bors commented Jul 23, 2018

⌛ Testing commit f92791d6cf941b11f4f35e3274d7edbe1aae2ad3 with merge d31fbf6d73b227336f4abaf4801440fbd6a09a22...

@bors
Copy link
Contributor

bors commented Jul 23, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 23, 2018
@kennytm kennytm 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2018
@pnkfelix
Copy link
Member

Error looks legit:

failures:
---- [ui (nll)] ui\issue-52126-assign-op-invariance.rs stdout ----
diff of stderr:
8	   |                                                        ------- borrow later used here
9	...
10	LL |     }
-	   |     - borrowed value only lives until here
+	   |     - `line` dropped here while still borrowed
12	
13	error: aborting due to previous error
14	
The actual stderr differed from the expected stderr.
Actual stderr saved to C:\projects\rust\build\x86_64-pc-windows-msvc\test\ui\issue-52126-assign-op-invariance.nll\issue-52126-assign-op-invariance.nll.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args issue-52126-assign-op-invariance.rs`
error: 1 errors occurred comparing output.
status: exit code: 1

@matthewjasper matthewjasper force-pushed the remove-unused-code branch 2 times, most recently from cc717f9 to 79e6db9 Compare July 23, 2018 19:46
With NLL region kinds are always ReVar
@matthewjasper
Copy link
Contributor Author

Fixed tests

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 26, 2018

📌 Commit 338d545 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 26, 2018

🌲 The tree is currently closed for pull requests below priority 99, 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 26, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 26, 2018
…=nikomatsakis

Don't match on region kinds when reporting NLL errors

First half (by number of tests affected) of the changes to "does not live long enough".

Now that lexical MIR borrowck is gone, region kinds are always ReVar, so matching on them to change errors does nothing.

Changes "borrowed value only lives until here" to "`x` is dropped here while still borrowed".

r? @pnkfelix  cc @nikomatsakis
bors added a commit that referenced this pull request Jul 26, 2018
Rollup of 16 pull requests

Successful merges:

 - #52558 (Add tests for ICEs which no longer repro)
 - #52610 (Clarify what a task is)
 - #52617 (Don't match on region kinds when reporting NLL errors)
 - #52635 (Fix #[linkage] propagation though generic functions)
 - #52647 (Suggest to take and ignore args while closure args count mismatching)
 - #52649 (Point spans to inner elements of format strings)
 - #52654 (Format linker args in a way that works for gcc and ld)
 - #52667 (update the stdsimd submodule)
 - #52674 (Impl Executor for Box<E: Executor>)
 - #52690 (ARM: expose `rclass` and `dsp` target features)
 - #52692 (Improve readability in a few sorts)
 - #52695 (Hide some lints which are not quite right the way they are reported to the user)
 - #52718 (State default capacity for BufReader/BufWriter)
 - #52721 (std::ops::Try impl for std::task::Poll)
 - #52723 (rustc: Register crates under their real names)
 - #52734 (sparc ABI issue - structure returning from function is returned in 64bit registers (with tests))

Failed merges:

 - #52678 ([NLL] Use better spans in some errors)

r? @ghost
@bors bors merged commit 338d545 into rust-lang:master Jul 26, 2018
@matthewjasper matthewjasper deleted the remove-unused-code branch July 26, 2018 20:26
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.

6 participants