Skip to content

Commit dcb7abd

Browse files
eholkzachs18
authored and
gitbot
committed
Stabilize noop_waker
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
1 parent c05904f commit dcb7abd

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

alloc/src/task.rs

-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
199199
///
200200
/// ```rust
201201
/// #![feature(local_waker)]
202-
/// #![feature(noop_waker)]
203202
/// use std::task::{LocalWake, ContextBuilder, LocalWaker, Waker};
204203
/// use std::future::Future;
205204
/// use std::pin::Pin;

core/src/task/wake.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ impl RawWaker {
6060
RawWaker { data, vtable }
6161
}
6262

63-
#[unstable(feature = "noop_waker", issue = "98286")]
63+
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
64+
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
6465
const NOOP: RawWaker = {
6566
const VTABLE: RawWakerVTable = RawWakerVTable::new(
6667
// Cloning just returns a new no-op raw waker
@@ -283,7 +284,6 @@ impl fmt::Debug for Context<'_> {
283284
/// # Examples
284285
/// ```
285286
/// #![feature(local_waker)]
286-
/// #![feature(noop_waker)]
287287
/// use std::task::{ContextBuilder, LocalWaker, Waker, Poll};
288288
/// use std::future::Future;
289289
///
@@ -555,8 +555,6 @@ impl Waker {
555555
/// # Examples
556556
///
557557
/// ```
558-
/// #![feature(noop_waker)]
559-
///
560558
/// use std::future::Future;
561559
/// use std::task;
562560
///
@@ -567,7 +565,8 @@ impl Waker {
567565
/// ```
568566
#[inline]
569567
#[must_use]
570-
#[unstable(feature = "noop_waker", issue = "98286")]
568+
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
569+
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
571570
pub const fn noop() -> &'static Waker {
572571
const WAKER: &Waker = &Waker { waker: RawWaker::NOOP };
573572
WAKER
@@ -850,8 +849,6 @@ impl LocalWaker {
850849
///
851850
/// ```
852851
/// #![feature(local_waker)]
853-
/// #![feature(noop_waker)]
854-
///
855852
/// use std::future::Future;
856853
/// use std::task::{ContextBuilder, LocalWaker, Waker, Poll};
857854
///
@@ -864,7 +861,7 @@ impl LocalWaker {
864861
/// ```
865862
#[inline]
866863
#[must_use]
867-
#[unstable(feature = "noop_waker", issue = "98286")]
864+
#[unstable(feature = "local_waker", issue = "118959")]
868865
pub const fn noop() -> &'static LocalWaker {
869866
const WAKER: &LocalWaker = &LocalWaker { waker: RawWaker::NOOP };
870867
WAKER

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
#![feature(maybe_uninit_write_slice)]
6262
#![feature(min_specialization)]
6363
#![feature(never_type)]
64-
#![feature(noop_waker)]
6564
#![feature(num_midpoint_signed)]
6665
#![feature(numfmt)]
6766
#![feature(pattern)]

0 commit comments

Comments
 (0)