Stabilize const-weak-new

Bump its stabilization version several times along
the way to accommodate changes in release processes.

Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Co-authored-by: Trevor Gross <t.gross35@gmail.com>
This commit is contained in:
CAD97 2022-04-12 01:29:16 -05:00 committed by Jubilee Young
parent b8f4cb6231
commit ee29d2fd0a
2 changed files with 2 additions and 2 deletions

View File

@ -2112,7 +2112,7 @@ impl<T> Weak<T> {
/// 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<T> {
Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::<RcBox<T>>(usize::MAX)) } }

View File

@ -1743,7 +1743,7 @@ impl<T> Weak<T> {
/// 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<T> {
Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::<ArcInner<T>>(usize::MAX)) } }