book icon indicating copy to clipboard operation
book copied to clipboard

Clarify we can still use user1.email after assignment

Open domfarolino opened this issue 2 years ago • 1 comments

https://github.com/rust-lang/book/issues/2978 was filed to track the fact that the text in ch05-01 was not clear enough to indicate that you could use a struct's un-borrowed properties after its borrowed properties were moved into another struct via assignment. https://github.com/rust-lang/book/commit/a371f82b0916cf21de2d56bd386ca5d72f7699b0 fixed this for the most part, by clarifying that you cannot use user1 as a whole, but I felt it would be good to clarify even more (via the new text this PR adds wrapped in parenthesis) that even if user1.username gets moved into user2, you can still use user1.email for example.

If this is too granular a clarification, feel free to dismiss, but I think it could be good!

domfarolino avatar Nov 26 '22 00:11 domfarolino

/cc @carols10cents, who made the original fix.

domfarolino avatar Nov 26 '22 00:11 domfarolino

@carols10cents what do you think?

domfarolino avatar Mar 11 '23 21:03 domfarolino

Please do not ping me, I will get to this when I get to it and pinging will not increase this pull request's priority. Thanks!

carols10cents avatar Mar 13 '23 13:03 carols10cents