From 891f00ce0fd8a6de03ae8c00b70f19d988825912 Mon Sep 17 00:00:00 2001 From: Florian Sextl Date: Thu, 13 Jun 2024 14:45:45 +0200 Subject: [PATCH] fix wrong assert_unsafe_precondition message for core::ptr::copy --- core/src/intrinsics.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/intrinsics.rs b/core/src/intrinsics.rs index cd3534ecb1239..6b5054a9f0612 100644 --- a/core/src/intrinsics.rs +++ b/core/src/intrinsics.rs @@ -3043,8 +3043,7 @@ pub const unsafe fn copy(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 (),