From ee29d2fd0a0b53f3460a9ffe67db6473e5913385 Mon Sep 17 00:00:00 2001 From: CAD97 Date: Tue, 12 Apr 2022 01:29:16 -0500 Subject: [PATCH] Stabilize const-weak-new Bump its stabilization version several times along the way to accommodate changes in release processes. Co-authored-by: Mara Bos Co-authored-by: Trevor Gross --- library/alloc/src/rc.rs | 2 +- library/alloc/src/sync.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index d0d37c08d1306..a00174ceac694 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2112,7 +2112,7 @@ impl Weak { /// assert!(empty.upgrade().is_none()); /// ``` #[stable(feature = "downgraded_weak", since = "1.10.0")] - #[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")] + #[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")] #[must_use] pub const fn new() -> Weak { Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::>(usize::MAX)) } } diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index a19999cd72580..f6c7ab27ba7de 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1743,7 +1743,7 @@ impl Weak { /// assert!(empty.upgrade().is_none()); /// ``` #[stable(feature = "downgraded_weak", since = "1.10.0")] - #[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")] + #[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")] #[must_use] pub const fn new() -> Weak { Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::>(usize::MAX)) } }