-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Clarify handling of src
in ptr::write
#40333
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
CC @niconii |
@bors: r+ rollup |
📌 Commit 025bf95 has been approved by |
The description seems overly contrived to me. I had to reread it multiple times and look at the issue to understand what the paragraph is getting at. |
@nagisa Mh. :/ I know this is just a single sentence but can you pinpoint why or what part caused you to reread that sentence multiple times? |
Clarify handling of `src` in `ptr::write` Fixes rust-lang#39733.
@tbu- I also think there are a few ways the wording could be improved.
Personally, I would reword it like this:
|
What Nicolette said.
…On Mar 8, 2017 15:45, "Nicolette Verlinden" ***@***.***> wrote:
@tbu- <https://github.com/tbu-> I also think there are a few ways the
wording could be improved.
-
Saying "it does not drop the contents of src *immediately*" seems
potentially confusing, since "it" here means "ptr::write", making it
sound like ptr::write itself could drop it at some later point.
-
Talking about "the contents of src" to parallel "the contents of dst"
is also not great given dst is a pointer whereas src is a value passed
directly into the function.
-
The thing being referred to by "it" changes from "ptr::write" to "the
contents of src" somewhat abruptly.
Personally, I would reword it like this:
In addition, it does not drop src. Semantically, src is moved into the
location pointed to by dst.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40333 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AApc0v-QmHNIL-TzeCcOWanX0vG1GMqwks5rjrDkgaJpZM4MWICC>
.
|
Clarify handling of `src` in `ptr::write` Fixes rust-lang#39733.
Clarify handling of `src` in `ptr::write` Fixes rust-lang#39733.
Fixes #39733.