-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add error codes #28443
Conversation
4cf6524
to
9e8a376
Compare
9e8a376
to
37cfa75
Compare
``` | ||
|
||
Please note that in rust, you can have as many reference on a variable as you | ||
want, but only one can be mutable. Example: |
There was a problem hiding this comment.
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
Updated ! |
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no "super" 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You sure ? :(
There was a problem hiding this comment.
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 😢
There was a problem hiding this comment.
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 ;)
7cf5012
to
1adcfb8
Compare
Updated ! |
@bors r+ rollup |
📌 Commit 1adcfb8 has been approved by |
r? @Manishearth