Closed musjj closed 1 year ago
Hi, thanks for the issue. This is one of those technically-correct but confusing behaviors right now, an instance of cognitive-engineering-lab/aquascope#85. v
loses read permissions because it is no longer live at that line. But if you extended the live range of v
by reading it later, that would be totally fine. As mentioned in the linked issue, we're working on a clearer explanation of this idea!
main
branch to see if this has already been fixed, in this file:URL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch04-03-fixing-ownership-errors.html#fixing-an-unsafe-program-copying-vs-moving-out-of-a-collection
Description of the problem:
v
should not lose read permission in second line.Suggested fix:
v
should keep its read permission.