-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reborrows #2144
Comments
At the time, I thought it was important, but I don't think reborrows fit the book. Thank you for keeping track though! |
Hey! I think reborrows very much fit that book! Knowing that the concept of ownership/borrowing is very important and omnipresent in Rust, I read the chapter extra carefully. After being done with the chapter and playing around with some code there was just one thing that I couldn't explain myself: why is this mut reference still usable after passing it to a function? After a bit of googleing I found that the answer is reborrowing, which happens instead of moving in certain situations. I think that this question comes up naturally when reading the chapter carefully and trying to understand all of the concepts, that's why I think reborrowing should at least be mentioned in the chapter. [edit] removed second half of my comment as it was unrelated to reborrowing. |
We need to make sure to talk about reborrows: rust-lang/rust#25899
Originally posted by @steveklabnik in #10 (comment)
So that issue was closed but it looks like reborrows are not covered in the book currently.
Specifically, in case with generics they don't work, and need to be written by hand.
The text was updated successfully, but these errors were encountered: