Skip to content
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

Mutable reference/mutable variable clarification in Chapter 4.2 #3754

Open
Aric5301 opened this issue Oct 24, 2023 · 0 comments
Open

Mutable reference/mutable variable clarification in Chapter 4.2 #3754

Aric5301 opened this issue Oct 24, 2023 · 0 comments
Milestone

Comments

@Aric5301
Copy link

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!

@carols10cents carols10cents changed the title Suggestion for Chapter 4.2 Mutable reference/mutable variable clarification in Chapter 4.2 Mar 22, 2024
@chriskrycho chriskrycho added this to the ch4 milestone Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants