Skip to content

Commit

Permalink
Unrolled build for rust-lang#126402
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#126402 - firefighterduck:fix-unsafe-precon-copy, r=Nilstrieb

Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`

A small fix in the `assert_unsafe_precondition` message for `core::ptr::copy` as described by rust-lang#126400 .

fixes rust-lang#126400
  • Loading branch information
rust-timer authored Jun 14, 2024
2 parents 0ef0dd2 + 0cc099b commit a1c9368
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3043,8 +3043,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
unsafe {
ub_checks::assert_unsafe_precondition!(
check_language_ub,
"ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null \
and the specified memory ranges do not overlap",
"ptr::copy requires that both pointer arguments are aligned and non-null",
(
src: *const () = src as *const (),
dst: *mut () = dst as *mut (),
Expand Down

0 comments on commit a1c9368

Please sign in to comment.