-
Notifications
You must be signed in to change notification settings - Fork 13k
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
ptr::copy: fix docs for the overlapping case #134606
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri |
r=me on wording, though maybe FCP of some kind is warranted? |
Fair, let's see what @rust-lang/libs-api says. |
No FCP needed, this doesn't change the general way in which people expect this method to work. @bors r=Mark-Simulacrum |
Rollup of 8 pull requests Successful merges: - rust-lang#134606 (ptr::copy: fix docs for the overlapping case) - rust-lang#134622 (Windows: Use WriteFile to write to a UTF-8 console) - rust-lang#134759 (compiletest: Remove the `-test` suffix from normalize directives) - rust-lang#134787 (Spruce up the docs of several queries related to the type/trait system and const eval) - rust-lang#134806 (rustdoc: use shorter paths as preferred canonical paths) - rust-lang#134815 (Sort triples by name in platform_support.md) - rust-lang#134816 (tools: fix build failure caused by PR rust-lang#134420) - rust-lang#134819 (Fix mistake in windows file open) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134606 - RalfJung:ptr-copy-docs, r=Mark-Simulacrum ptr::copy: fix docs for the overlapping case Fixes rust-lang/unsafe-code-guidelines#549 As discussed in that issue, it doesn't make any sense for `copy` to read a byte via `src` after it was already written via `dst`. The entire point of this method is that is copies correctly even if they overlap, and that requires always reading any given location before writing it. Cc `@rust-lang/opsem`
…ulacrum ptr::copy: fix docs for the overlapping case Fixes rust-lang/unsafe-code-guidelines#549 As discussed in that issue, it doesn't make any sense for `copy` to read a byte via `src` after it was already written via `dst`. The entire point of this method is that is copies correctly even if they overlap, and that requires always reading any given location before writing it. Cc `@rust-lang/opsem`
Rollup of 8 pull requests Successful merges: - rust-lang#134606 (ptr::copy: fix docs for the overlapping case) - rust-lang#134622 (Windows: Use WriteFile to write to a UTF-8 console) - rust-lang#134759 (compiletest: Remove the `-test` suffix from normalize directives) - rust-lang#134787 (Spruce up the docs of several queries related to the type/trait system and const eval) - rust-lang#134806 (rustdoc: use shorter paths as preferred canonical paths) - rust-lang#134815 (Sort triples by name in platform_support.md) - rust-lang#134816 (tools: fix build failure caused by PR rust-lang#134420) - rust-lang#134819 (Fix mistake in windows file open) r? `@ghost` `@rustbot` modify labels: rollup
Fixes rust-lang/unsafe-code-guidelines#549
As discussed in that issue, it doesn't make any sense for
copy
to read a byte viasrc
after it was already written viadst
. The entire point of this method is that is copies correctly even if they overlap, and that requires always reading any given location before writing it.Cc @rust-lang/opsem