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:
parent
b8f4cb6231
commit
ee29d2fd0a
@ -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)) } }
|
||||
|
@ -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)) } }
|
||||
|
Loading…
Reference in New Issue
Block a user