Skip to content

Commit 55041d3

Browse files
eholkzachs18
andcommitted
Stabilize noop_waker
Co-authored-by: zachs18 <[email protected]>
1 parent c82e0df commit 55041d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+100
-127
lines changed

library/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;

library/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
///
@@ -557,8 +557,6 @@ impl Waker {
557557
/// # Examples
558558
///
559559
/// ```
560-
/// #![feature(noop_waker)]
561-
///
562560
/// use std::future::Future;
563561
/// use std::task;
564562
///
@@ -569,7 +567,8 @@ impl Waker {
569567
/// ```
570568
#[inline]
571569
#[must_use]
572-
#[unstable(feature = "noop_waker", issue = "98286")]
570+
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
571+
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
573572
pub const fn noop() -> &'static Waker {
574573
const WAKER: &Waker = &Waker { waker: RawWaker::NOOP };
575574
WAKER
@@ -852,8 +851,6 @@ impl LocalWaker {
852851
///
853852
/// ```
854853
/// #![feature(local_waker)]
855-
/// #![feature(noop_waker)]
856-
///
857854
/// use std::future::Future;
858855
/// use std::task::{ContextBuilder, LocalWaker, Waker, Poll};
859856
///
@@ -866,7 +863,7 @@ impl LocalWaker {
866863
/// ```
867864
#[inline]
868865
#[must_use]
869-
#[unstable(feature = "noop_waker", issue = "98286")]
866+
#[unstable(feature = "local_waker", issue = "118959")]
870867
pub const fn noop() -> &'static LocalWaker {
871868
const WAKER: &LocalWaker = &LocalWaker { waker: RawWaker::NOOP };
872869
WAKER

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
#![feature(maybe_uninit_write_slice)]
6767
#![feature(min_specialization)]
6868
#![feature(never_type)]
69-
#![feature(noop_waker)]
7069
#![feature(num_midpoint)]
7170
#![feature(numfmt)]
7271
#![feature(pattern)]

src/tools/miri/tests/pass/async-closure-captures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Same as rustc's `tests/ui/async-await/async-closures/captures.rs`, keep in sync
22

3-
#![feature(async_closure, noop_waker)]
3+
#![feature(async_closure)]
44

55
use std::future::Future;
66
use std::pin::pin;

src/tools/miri/tests/pass/async-closure-drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(async_closure, noop_waker, async_fn_traits)]
1+
#![feature(async_closure, async_fn_traits)]
22

33
use std::future::Future;
44
use std::pin::pin;

src/tools/miri/tests/pass/async-closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(async_closure, noop_waker, async_fn_traits)]
1+
#![feature(async_closure, async_fn_traits)]
22
#![allow(unused)]
33

44
use std::future::Future;

src/tools/miri/tests/pass/async-drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// please consider modifying rustc's async drop test at
77
// `tests/ui/async-await/async-drop.rs`.
88

9-
#![feature(async_drop, impl_trait_in_assoc_type, noop_waker, async_closure)]
9+
#![feature(async_drop, impl_trait_in_assoc_type, async_closure)]
1010
#![allow(incomplete_features, dead_code)]
1111

1212
// FIXME(zetanumbers): consider AsyncDestruct::async_drop cleanup tests

src/tools/miri/tests/pass/async-fn.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(never_type)]
2-
#![feature(noop_waker)]
32

43
use std::future::Future;
54

src/tools/miri/tests/pass/dyn-star.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(dyn_star)]
22
#![allow(incomplete_features)]
33
#![feature(custom_inner_attributes)]
4-
#![feature(noop_waker)]
54
// rustfmt destroys `dyn* Trait` syntax
65
#![rustfmt::skip]
76

src/tools/miri/tests/pass/future-self-referential.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
3-
#![feature(noop_waker)]
43

54
use std::future::*;
65
use std::marker::PhantomPinned;

src/tools/miri/tests/pass/issues/issue-miri-2068.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(noop_waker)]
2-
31
use std::future::Future;
42
use std::pin::Pin;
53
use std::task::{Context, Poll, Waker};

src/tools/miri/tests/pass/move-data-across-await-point.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(noop_waker)]
21
use std::future::Future;
32
use std::ptr;
43

0 commit comments

Comments
 (0)