Closed
Description
In general, it can be useful to have support for borrows that aren't tied to lexical scopes.
Related links:
- Nested method calls with
&mut
receivers result in borrowck errors (Nested method calls with&mut
receivers result in borrowck errors rust#6268)- Internals thread: "Accepting nested method calls with an
&mut self
receiver"
- Internals thread: "Accepting nested method calls with an
- Borrow scopes should not always be lexical (borrow scopes should not always be lexical rust#6393)
- Single-entry, multiple-exit regions for borrows (RFC: Single-entry / multiple-exit regions for borrows #396)
UPDATE: The relevant RFCs have been accepted. See rust-lang/rust#43234 to track implementation progress here.