MIR borrowck: error message confuses locals and temporaries#46598
MIR borrowck: error message confuses locals and temporaries#46598bors merged 7 commits intorust-lang:masterfrom davidtwco:issue-46471
Conversation
|
I'm also not sure that the condition I'm checking is what I should be using for this, but it works.
I think it might also be worth splitting the |
|
I've fixed issues referenced in my previous comment and also fixed #46472 as mentioned in this Gitter comment. I think the function might be getting a bit a unwieldly since it's handling a bunch of cases. I've adjusted tests to allow the handful of places where spans are off by a character. |
There was a problem hiding this comment.
This doesn't handle the case where a local needs to live until an end_span, aka
let x = {
let y = 0;
&y
};There was a problem hiding this comment.
This should now be being handled.
|
📌 Commit e1723d2 has been approved by |
|
@bors p=0 This hasn't passed travis yet |
|
@bors r- Travis failed. |
|
I've fixed the previous issue where a local might need to live until an |
|
I've updated the existing tests to use the new error messages. This should now pass Travis. |
There was a problem hiding this comment.
There looks to be quite some connection between the span and the error message, so I would prefer to have 4 separate functions - 1 for each distinct error messagee
Travis is still failing.If nothing goes wrong, #46558 will be merged soon, so you'll likely need to rebase. |
|
We're working on it. |
|
☔ The latest upstream changes (presumably #46558) made this pull request unmergeable. Please resolve the merge conflicts. |
|
All previous issues should be resolved and it's now rebased on top of the current master (or as of an hour ago). |
|
Alright, fifth time lucky. I've fixed the indentation and other requested changes from Gitter and updated the failing tests from the recent Travis run. |
|
That's cool! @bors r+ |
|
📌 Commit 3dbc11b has been approved by |
MIR borrowck: error message confuses locals and temporaries Fixes #46471 and fixes #46472 (see [this Gitter comment](https://gitter.im/rust-impl-period/WG-compiler-nll?at=5a2d5cb53ae2aa6b3facf0c2)). r? @arielb1
|
☀️ Test successful - status-appveyor, status-travis |
Fixes #46471 and fixes #46472 (see this Gitter comment).
r? @arielb1