-
Notifications
You must be signed in to change notification settings - Fork 14k
Avoid using the copy_nonoverlapping wrapper through mem::replace.
#87827
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
Conversation
|
Looks reasonable enough to me. |
|
Yeah this makes sense. |
|
@bors r+ rollup=never |
|
📌 Commit d3dd6cb11db296a59dc0997db65b32403c930cd3 has been approved by |
|
⌛ Testing commit d3dd6cb11db296a59dc0997db65b32403c930cd3 with merge bba5126c336dad13ada2c34b7425aaf94d01c1d9... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d3dd6cb to
a1d014b
Compare
|
@bors r=m-ou-se |
|
📌 Commit a1d014b has been approved by |
|
☀️ Test successful - checks-actions |
This is a much simpler way to achieve the pre-#86003 behavior of
mem::replacenot needing dynamically-sizedmemcpys (at least before inlining), than re-doing #81238 (which needs #86699 or something similar).I didn't notice it until recently, but
ptr::writealready explicitly avoided using the wrapper, whileptr::readjust called the wrapper (and was the reason for us observing any behavior change from #86003 in Rust-GPU).The codegen test I've added fails without the change to
core::ptr::readlike this (ignore thev0mangling, I was using a worktree with it turned on by default, for this):With the
core::ptr::readchange,core::intrinsics::copy_nonoverlappingdoesn't get instantiated and the test passes.r? @m-ou-se cc @nagisa (codegen test) @oli-obk / @RalfJung (miri diagnostic changes)