Uh oh!
There was an error while loading. Please reload this page.
[NLL] Use new region infer errors when explaining borrows - #55069
Conversation
nikomatsakis
left a comment
There was a problem hiding this comment.
This is awesome. I proposed some tweaks to wording. Thoughts?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bc3a96f to
2245840Comparenikomatsakis
commented
Oct 17, 2018
r=me but r? @pnkfelix on the one remaining question |
pnkfelix
commented
Oct 17, 2018
@bors r=nikomatsakis |
bors
commented
Oct 17, 2018
📌 Commit 22458404d6bb34a0754dd2614b0417a4ddb7b66c has been approved by |
bors
commented
Oct 18, 2018
☔ The latest upstream changes (presumably #55134) made this pull request unmergeable. Please resolve the merge conflicts. |
f001861 to
4418569Comparematthewjasper
commented
Oct 18, 2018
@bors r=nikomatsakis |
bors
commented
Oct 18, 2018
📌 Commit 4418569d8feb686360a71bde2c6172af85196bbd has been approved by |
bors
commented
Oct 20, 2018
⌛ Testing commit 4418569d8feb686360a71bde2c6172af85196bbd with merge 1943e725a2e9dd16eca66aa63b642e9618a0382b... |
bors
commented
Oct 20, 2018
💔 Test failed - status-appveyor |
rust-highfive
commented
Oct 20, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Adds UseAsConst and UseAsStatic to replace Return in consts/statics. Don't report the arguments to an overloaded operator as CallArguments. Also don't report "escaping data" in these items.
4418569 to
5d1896bComparematthewjasper
commented
Oct 20, 2018
@bors r=nikomatsakis |
bors
commented
Oct 20, 2018
📌 Commit 5d1896b2b165966aee793f3c7c2f769cc08fb82f has been approved by |
rust-highfive
commented
Oct 20, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Oct 21, 2018
⌛ Testing commit 5d1896b2b165966aee793f3c7c2f769cc08fb82f with merge 6f8d54c93da893ef598344137cb3fc950997a35b... |
bors
commented
Oct 21, 2018
💔 Test failed - status-appveyor |
rust-highfive
commented
Oct 21, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
5d1896b to
2a3969aComparematthewjasper
commented
Oct 21, 2018
@bors r=nikomatsakis |
bors
commented
Oct 21, 2018
📌 Commit 2a3969a has been approved by |
bors
commented
Oct 21, 2018
…nikomatsakis [NLL] Use new region infer errors when explaining borrows Use the new free region infer errors for explaining borrows This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable. (E0521) Closes#51026 - `regions-nested-fns-2.rs` isn't changed to that diagnostic, since that would not be the correct error here. Closes#51169 cc #53882 - The error is (IMO) better now, but it could be better when we trace lifetimes in these error messages. r? @nikomatsakis cc @pnkfelix
bors
commented
Oct 21, 2018
☀️ Test successful - status-appveyor, status-travis |
Use the new free region infer errors for explaining borrows
This gives at least some explanation for why a borrow is expected to
last for a certain free region. Also:
Closes#51026 -
regions-nested-fns-2.rsisn't changed to that diagnostic, since that would not be the correct error here.Closes#51169
cc #53882 - The error is (IMO) better now, but it could be better when we trace lifetimes in these error messages.
r? @nikomatsakis cc @pnkfelix