-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Avoid using the copy_nonoverlapping
wrapper through mem::replace
.
#87827
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::replace
not needing dynamically-sizedmemcpy
s (at least before inlining), than re-doing #81238 (which needs #86699 or something similar).I didn't notice it until recently, but
ptr::write
already explicitly avoided using the wrapper, whileptr::read
just 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::read
like this (ignore thev0
mangling, I was using a worktree with it turned on by default, for this):With the
core::ptr::read
change,core::intrinsics::copy_nonoverlapping
doesn't get instantiated and the test passes.r? @m-ou-se cc @nagisa (codegen test) @oli-obk / @RalfJung (miri diagnostic changes)