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 upMIR Borrowck: two-phased borrows #46037
Comments
nikomatsakis
added
T-compiler
WG-compiler-nll
labels
Nov 16, 2017
nikomatsakis
added this to the NLL prototype milestone
Nov 16, 2017
This comment has been minimized.
This comment has been minimized.
|
@pnkfelix may tackle this. |
pnkfelix
self-assigned this
Nov 17, 2017
This comment has been minimized.
This comment has been minimized.
|
PR: #46537 |
This was referenced Dec 18, 2017
aturon
referenced this issue
Dec 19, 2017
Closed
Tracking issue for RFC 2025: Enabled nested method calls #44100
This comment has been minimized.
This comment has been minimized.
|
This is done (there are follow-up issues, but those are linked elsewhere) |
nikomatsakis
closed this
Jan 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nikomatsakis commentedNov 16, 2017
•
edited
For maximum impact of demo, we should support two-phased borrows. The general strategy here is to do this in borrow check. When we see a suitable
&mutborrow (one tricky bit: deciding the set of&mutborrows for which to do this), we want to generate two loans, one of which is the "first phase" (reserved?) loan that acts as a shared borrow. This will be gen'd at the borrow site and killed at the first use of the temporary to which the borrow is assigned. The other loan will be gen'd at that first use site and killed as normal. This is a placeholder issue to ensure it is not forgotten, more description perhaps to come. =)