about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2025-02-11 17:38:52 -0500
committerBen Kimock <kimockb@gmail.com>2025-02-12 12:20:14 -0500
commit21bb8cb946fbdbcd0b22f12d1c0d2091f2a7fb2f (patch)
tree73b0b74a10af292c7748429046a30a86258b07e8 /library/core
parent06a24e98c612d72add1c3355282510513b153dcc (diff)
downloadrust-21bb8cb946fbdbcd0b22f12d1c0d2091f2a7fb2f.tar.gz
rust-21bb8cb946fbdbcd0b22f12d1c0d2091f2a7fb2f.zip
Change swap_nonoverlapping from lang to library UB
Diffstat (limited to 'library/core')
-rw-r--r--library/core/src/ptr/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs
index e1348552b65..eb99be817a2 100644
--- a/library/core/src/ptr/mod.rs
+++ b/library/core/src/ptr/mod.rs
@@ -1070,7 +1070,7 @@ pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
 #[rustc_diagnostic_item = "ptr_swap_nonoverlapping"]
 pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
     ub_checks::assert_unsafe_precondition!(
-        check_language_ub,
+        check_library_ub,
         "ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null \
         and the specified memory ranges do not overlap",
         (