Skip to content

Commit 3715d9e

Browse files
committed
Change swap_nonoverlapping from lang to library UB
1 parent aae7e6c commit 3715d9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
10701070
#[rustc_diagnostic_item = "ptr_swap_nonoverlapping"]
10711071
pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
10721072
ub_checks::assert_unsafe_precondition!(
1073-
check_language_ub,
1073+
check_library_ub,
10741074
"ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null \
10751075
and the specified memory ranges do not overlap",
10761076
(

0 commit comments

Comments
 (0)