@@ -1009,6 +1009,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
10091009#[ stable( feature = "rust1" , since = "1.0.0" ) ]
10101010#[ rustc_const_unstable( feature = "const_swap" , issue = "83163" ) ]
10111011#[ rustc_diagnostic_item = "ptr_swap" ]
1012+ #[ rustc_const_stable_indirect]
10121013pub const unsafe fn swap < T > ( x : * mut T , y : * mut T ) {
10131014 // Give ourselves some scratch space to work with.
10141015 // 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) {
10691070/// ```
10701071#[ inline]
10711072#[ 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 " ) ]
10731074#[ rustc_diagnostic_item = "ptr_swap_nonoverlapping" ]
10741075pub const unsafe fn swap_nonoverlapping < T > ( x : * mut T , y : * mut T , count : usize ) {
10751076 #[ allow( unused) ]
@@ -1129,7 +1130,6 @@ pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
11291130/// LLVM can vectorize this (at least it can for the power-of-two-sized types
11301131/// `swap_nonoverlapping` tries to use) so no need to manually SIMD it.
11311132#[ inline]
1132- #[ rustc_const_unstable( feature = "const_swap" , issue = "83163" ) ]
11331133const 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