Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upyet another "old borrowck" bug around match default bindings #51686
Conversation
rust-highfive
assigned
eddyb
Jun 21, 2018
rust-highfive
added
the
S-waiting-on-review
label
Jun 21, 2018
This comment has been minimized.
This comment has been minimized.
|
Hmm, adding in the asserts I wanted caused some failures elsewhere that I don't know if I fully want to mix into this PR. I'm going to remove the WIP. |
nikomatsakis
changed the title
[WIP] yet another "old borrowck" bug around match default bindings
yet another "old borrowck" bug around match default bindings
Jun 21, 2018
This comment has been minimized.
This comment has been minimized.
|
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 |
nikomatsakis
referenced this pull request
Jun 21, 2018
Closed
ICE on rustc 1.26.0-nightly (ae544ee1c 2018-03-29) #49534
nikomatsakis
added some commits
Jun 21, 2018
nikomatsakis
force-pushed the
nikomatsakis:issue-51415-borrowck-match-default-bindings-bug
branch
from
0885d97
to
8289bf2
Jun 21, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Jun 21, 2018
jnicholls
approved these changes
Jun 22, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors p=17 |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jun 22, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 8289bf2
into
rust-lang:master
Jun 22, 2018
pietroalbini
added
the
beta-nominated
label
Jun 22, 2018
This comment has been minimized.
This comment has been minimized.
|
Nominating this to be backported into beta, especially if this is going to get into 1.27.1. |
nikomatsakis commentedJun 21, 2018
•
edited
We were getting the type of the parameter from its pattern, but that didn't include adjustments. I did a
ripgreparound and this seemed to be the only affected case.The reason this didn't show up as an ICE earlier is that mem-categorization is lenient with respect to weird discrepancies. I am going to add more delay-span-bug calls shortly around that (I'll push onto the PR).
This example is an ICE, but I presume that there is a way to make a soundness example out of this -- it basically ignores borrows occuring inside match-default-bindings in a closure, though only if the implicit deref is at the top-level. It happens though that this occurs frequently in iterators, which often give a
&Tparameter.Fixes #51415
Fixes #49534
r? @eddyb