Skip to content

Commit 9bfd462

Browse files
committed
move swap_nonoverlapping constness to separate feature gate
1 parent 23d9741 commit 9bfd462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/ptr/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
10691069
/// ```
10701070
#[inline]
10711071
#[stable(feature = "swap_nonoverlapping", since = "1.27.0")]
1072-
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
1072+
#[rustc_const_unstable(feature = "const_swap_nonoverlapping", issue = "133668")]
10731073
#[rustc_diagnostic_item = "ptr_swap_nonoverlapping"]
10741074
pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
10751075
#[allow(unused)]
@@ -1129,7 +1129,7 @@ pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
11291129
/// LLVM can vectorize this (at least it can for the power-of-two-sized types
11301130
/// `swap_nonoverlapping` tries to use) so no need to manually SIMD it.
11311131
#[inline]
1132-
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
1132+
#[rustc_const_unstable(feature = "const_swap_nonoverlapping", issue = "133668")]
11331133
const unsafe fn swap_nonoverlapping_simple_untyped<T>(x: *mut T, y: *mut T, count: usize) {
11341134
let x = x.cast::<MaybeUninit<T>>();
11351135
let y = y.cast::<MaybeUninit<T>>();

0 commit comments

Comments
 (0)