Skip to content
/ rust Public
forked from rust-lang/rust

Commit ee29d2f

Browse files
CAD97m-ou-setgross35
authored andcommitted
Stabilize const-weak-new
Bump its stabilization version several times along the way to accommodate changes in release processes. Co-authored-by: Mara Bos <[email protected]> Co-authored-by: Trevor Gross <[email protected]>
1 parent b8f4cb6 commit ee29d2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2112,7 +2112,7 @@ impl<T> Weak<T> {
21122112
/// assert!(empty.upgrade().is_none());
21132113
/// ```
21142114
#[stable(feature = "downgraded_weak", since = "1.10.0")]
2115-
#[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")]
2115+
#[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")]
21162116
#[must_use]
21172117
pub const fn new() -> Weak<T> {
21182118
Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::<RcBox<T>>(usize::MAX)) } }

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ impl<T> Weak<T> {
17431743
/// assert!(empty.upgrade().is_none());
17441744
/// ```
17451745
#[stable(feature = "downgraded_weak", since = "1.10.0")]
1746-
#[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")]
1746+
#[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")]
17471747
#[must_use]
17481748
pub const fn new() -> Weak<T> {
17491749
Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::<ArcInner<T>>(usize::MAX)) } }

0 commit comments

Comments
 (0)