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

Add error codes #28443

Merged
merged 4 commits into from
Sep 19, 2015
Merged

Add error codes #28443

merged 4 commits into from
Sep 19, 2015

Conversation

GuillaumeGomez
Copy link
Member

```

Please note that in rust, you can have as many reference on a variable as you
want, but only one can be mutable. Example:
Copy link
Member

Choose a reason for hiding this comment

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

You can either have many immutable references, or one mutable reference.

(You cannot have an immutable reference + a mutable reference at any time)

Link to the book on ownership and borrowing for more info

@GuillaumeGomez
Copy link
Member Author

Updated !

@GuillaumeGomez
Copy link
Member Author

I'll stop this PR here and open a new one if I find other error codes not filed.

let mut i = 0;
let a = &i; // ok!
let b = &i; // still ok!
let c = &i; // super still ok!
Copy link
Member

Choose a reason for hiding this comment

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

no "super" 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

You sure ? :(

Copy link
Contributor

Choose a reason for hiding this comment

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

He's probably super sure 😢

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to convince him for another better sentence ! A bit of humor never kills ;)

@GuillaumeGomez
Copy link
Member Author

Updated !

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 19, 2015

📌 Commit 1adcfb8 has been approved by Manishearth

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Sep 19, 2015
bors added a commit that referenced this pull request Sep 19, 2015
@bors bors merged commit 1adcfb8 into rust-lang:master Sep 19, 2015
@GuillaumeGomez GuillaumeGomez deleted the error_codes branch September 19, 2015 23:01
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.

4 participants