You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I have started learning Rust and have a small suggestion for chapter 4.2.
I think that it's worth it to directly state that you can create a mutable reference only to a mutable variable, meaning that you can't create a mutable reference to an unmutable variable.
After reading the chapter I was left with that question in mind ("What if I create a mutable reference to an unmutable variable? Is it even possible?"). Of course that I quickly opened the compiler and checked for my self, but still I think that it's worth adding.
Thanks!
The text was updated successfully, but these errors were encountered:
carols10cents
changed the title
Suggestion for Chapter 4.2
Mutable reference/mutable variable clarification in Chapter 4.2
Mar 22, 2024
Hello.
I have started learning Rust and have a small suggestion for chapter 4.2.
I think that it's worth it to directly state that you can create a mutable reference only to a mutable variable, meaning that you can't create a mutable reference to an unmutable variable.
After reading the chapter I was left with that question in mind ("What if I create a mutable reference to an unmutable variable? Is it even possible?"). Of course that I quickly opened the compiler and checked for my self, but still I think that it's worth adding.
Thanks!
The text was updated successfully, but these errors were encountered: