Skip to content

Commit 28e5e93

Browse files
drop some const unstables, due to revert no longer possible
1 parent 80ec986 commit 28e5e93

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

library/core/src/mem/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,7 @@ pub unsafe fn uninitialized<T>() -> T {
682682
/// ```
683683
#[inline]
684684
#[stable(feature = "rust1", since = "1.0.0")]
685-
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
686-
pub const fn swap<T>(x: &mut T, y: &mut T) {
685+
pub fn swap<T>(x: &mut T, y: &mut T) {
687686
// SAFETY: the raw pointers have been created from safe mutable references satisfying all the
688687
// constraints on `ptr::swap_nonoverlapping_one`
689688
unsafe {
@@ -813,8 +812,7 @@ pub fn take<T: Default>(dest: &mut T) -> T {
813812
#[inline]
814813
#[stable(feature = "rust1", since = "1.0.0")]
815814
#[must_use = "if you don't need the old value, you can just assign the new value directly"]
816-
#[rustc_const_unstable(feature = "const_replace", issue = "83164")]
817-
pub const fn replace<T>(dest: &mut T, src: T) -> T {
815+
pub fn replace<T>(dest: &mut T, src: T) -> T {
818816
// SAFETY: We read from `dest` but directly write `src` into it afterwards,
819817
// such that the old value is not duplicated. Nothing is dropped and
820818
// nothing here can panic.

library/core/src/ptr/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@ pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
463463
}
464464

465465
#[inline]
466-
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
467-
pub(crate) const unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
466+
pub(crate) unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
468467
// For types smaller than the block optimization below,
469468
// just swap directly to avoid pessimizing codegen.
470469
if mem::size_of::<T>() < 32 {

library/core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,9 +1013,8 @@ impl<T: ?Sized> *mut T {
10131013
///
10141014
/// [`ptr::write`]: crate::ptr::write()
10151015
#[stable(feature = "pointer_methods", since = "1.26.0")]
1016-
#[rustc_const_unstable(feature = "const_ptr_write", issue = "none")]
10171016
#[inline]
1018-
pub const unsafe fn write(self, val: T)
1017+
pub unsafe fn write(self, val: T)
10191018
where
10201019
T: Sized,
10211020
{

0 commit comments

Comments
 (0)