Skip to content

Commit

Permalink
fix wrong assert_unsafe_precondition message for core::ptr::copy
Browse files Browse the repository at this point in the history
  • Loading branch information
firefighterduck committed Jun 13, 2024
1 parent 9921cd2 commit 891f00c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions 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 891f00c

Please sign in to comment.