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

Explained asterisk on & and &mut reference #27566

Merged
merged 2 commits into from
Aug 6, 2015
Merged

Explained asterisk on & and &mut reference #27566

merged 2 commits into from
Aug 6, 2015

Conversation

rubyroobs
Copy link

I got a bit confused reading the guide over why all of a sudden there was an asterisk in the code. I was explained what it was there for in the IRC, and I think it should added it to the docs to prevent any further confusion!

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik steveklabnik assigned steveklabnik and unassigned pcwalton Aug 6, 2015
@@ -125,6 +125,10 @@ This will print `6`. We make `y` a mutable reference to `x`, then add one to
the thing `y` points at. You’ll notice that `x` had to be marked `mut` as well,
if it wasn’t, we couldn’t take a mutable borrow to an immutable value.

You'll also notice we added an asterisk in front of `y`, making it `*y`,
this is because y is an `&mut` reference. You'll also need to use them for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This y should have graves as well, so it looks like code.

@steveklabnik
Copy link
Member

A few tiny nits! Thanks again for catching this and sending a PR in.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 6, 2015

📌 Commit d3e089f has been approved by steveklabnik

@bors
Copy link
Contributor

bors commented Aug 6, 2015

⌛ Testing commit d3e089f with merge 68f7928...

bors added a commit that referenced this pull request Aug 6, 2015
I got a bit confused reading the guide over why all of a sudden there was an asterisk in the code. I was explained what it was there for in the IRC, and I think it should added it to the docs to prevent any further confusion!
@bors bors merged commit d3e089f into rust-lang:master Aug 6, 2015
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

Successfully merging this pull request may close these issues.

None yet

5 participants