@@ -1009,6 +1009,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
1009
1009
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1010
1010
#[ rustc_const_unstable( feature = "const_swap" , issue = "83163" ) ]
1011
1011
#[ rustc_diagnostic_item = "ptr_swap" ]
1012
+ #[ rustc_const_stable_indirect]
1012
1013
pub const unsafe fn swap < T > ( x : * mut T , y : * mut T ) {
1013
1014
// Give ourselves some scratch space to work with.
1014
1015
// We do not have to worry about drops: `MaybeUninit` does nothing when dropped.
@@ -1069,7 +1070,7 @@ pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
1069
1070
/// ```
1070
1071
#[ inline]
1071
1072
#[ stable( feature = "swap_nonoverlapping" , since = "1.27.0" ) ]
1072
- #[ rustc_const_unstable( feature = "const_swap " , issue = "83163 " ) ]
1073
+ #[ rustc_const_unstable( feature = "const_swap_nonoverlapping " , issue = "133668 " ) ]
1073
1074
#[ rustc_diagnostic_item = "ptr_swap_nonoverlapping" ]
1074
1075
pub const unsafe fn swap_nonoverlapping < T > ( x : * mut T , y : * mut T , count : usize ) {
1075
1076
#[ allow( unused) ]
@@ -1129,7 +1130,6 @@ pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
1129
1130
/// LLVM can vectorize this (at least it can for the power-of-two-sized types
1130
1131
/// `swap_nonoverlapping` tries to use) so no need to manually SIMD it.
1131
1132
#[ inline]
1132
- #[ rustc_const_unstable( feature = "const_swap" , issue = "83163" ) ]
1133
1133
const unsafe fn swap_nonoverlapping_simple_untyped < T > ( x : * mut T , y : * mut T , count : usize ) {
1134
1134
let x = x. cast :: < MaybeUninit < T > > ( ) ;
1135
1135
let y = y. cast :: < MaybeUninit < T > > ( ) ;
0 commit comments