-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Cleanup lifetime and pointer guides #14387
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
Cleanup lifetime and pointer guides #14387
Conversation
Clean pointers guide
copied. For points, this is probably not so bad, but often copies are | ||
two points, no matter where they were stored. One option is to define a function | ||
that takes two arguments of type `Point`—that is, it takes the points __by value__. | ||
But if we define it this way, calling the function will cause the points __to be |
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.
Don't use emphasis around here, it's distracting.
Thanks for doing this! Clean docs are really important. |
…inters" section back to pointers guide
ready for a second review. |
Comments from someone on IRC:
|
@@ -294,7 +201,7 @@ and `x` is declared as mutable. However, the compiler can prove that | |||
and in fact is mutated later in the function. |
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.
GitHub won’t let me comment on it, but four lines up (line 290/197) it reads ‘Here, as before, the interior of the variable x
…’. That previous section was removed, so you should probably remove the ‘as before’ part.
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.
ohhh, nice catch! thanks
Ready for a third review. |
… r=brson My main goals were: - be clear when we talk about "references" and "pointers" - remove Managed boxes completely and the concept of GC. #13987
My main goals were:
#13987