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

Commit e5a6e5c

Browse files
Rollup merge of rust-lang#95965 - CAD97:const-weak-new, r=workingjubilee
Stabilize const-weak-new This is a fairly uncontroversial library stabilization, so I'm going ahead and proposing it to ride the trains to stable. This stabilizes the following APIs, which are defined to be non-allocating constructors. ```rust // alloc::rc impl<T> Weak<T> { pub const fn new() -> Weak<T>; } // alloc::sync impl<T> Weak<T> { pub const fn new() -> Weak<T>; } ``` Closes rust-lang#95091 ``@rustbot`` modify labels: +needs-fcp
2 parents d4145ee + ee29d2f commit e5a6e5c

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
@@ -2719,7 +2719,7 @@ impl<T> Weak<T> {
27192719
/// ```
27202720
#[inline]
27212721
#[stable(feature = "downgraded_weak", since = "1.10.0")]
2722-
#[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")]
2722+
#[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")]
27232723
#[must_use]
27242724
pub const fn new() -> Weak<T> {
27252725
Weak {

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ impl<T> Weak<T> {
25032503
/// ```
25042504
#[inline]
25052505
#[stable(feature = "downgraded_weak", since = "1.10.0")]
2506-
#[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")]
2506+
#[rustc_const_stable(feature = "const_weak_new", since = "CURRENT_RUSTC_VERSION")]
25072507
#[must_use]
25082508
pub const fn new() -> Weak<T> {
25092509
Weak {

0 commit comments

Comments
 (0)