diff options
| -rw-r--r-- | library/core/src/future/join.rs | 4 | ||||
| -rw-r--r-- | library/core/src/future/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/future/poll_fn.rs | 11 | ||||
| -rw-r--r-- | library/core/tests/lib.rs | 1 |
4 files changed, 8 insertions, 10 deletions
diff --git a/library/core/src/future/join.rs b/library/core/src/future/join.rs index fa4eb0d2f33..35f0dea062e 100644 --- a/library/core/src/future/join.rs +++ b/library/core/src/future/join.rs @@ -15,7 +15,7 @@ use crate::task::{Context, Poll}; /// # Examples /// /// ``` -/// #![feature(future_join, future_poll_fn)] +/// #![feature(future_join)] /// /// use std::future::join; /// @@ -31,7 +31,7 @@ use crate::task::{Context, Poll}; /// `join!` is variadic, so you can pass any number of futures: /// /// ``` -/// #![feature(future_join, future_poll_fn)] +/// #![feature(future_join)] /// /// use std::future::join; /// diff --git a/library/core/src/future/mod.rs b/library/core/src/future/mod.rs index 90eecb9d4a0..6487aa08859 100644 --- a/library/core/src/future/mod.rs +++ b/library/core/src/future/mod.rs @@ -37,7 +37,7 @@ pub use pending::{pending, Pending}; #[stable(feature = "future_readiness_fns", since = "1.48.0")] pub use ready::{ready, Ready}; -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] pub use poll_fn::{poll_fn, PollFn}; /// This type is needed because: diff --git a/library/core/src/future/poll_fn.rs b/library/core/src/future/poll_fn.rs index 9ae118e29f1..db2a523323b 100644 --- a/library/core/src/future/poll_fn.rs +++ b/library/core/src/future/poll_fn.rs @@ -10,7 +10,6 @@ use crate::task::{Context, Poll}; /// # Examples /// /// ``` -/// #![feature(future_poll_fn)] /// # async fn run() { /// use core::future::poll_fn; /// use std::task::{Context, Poll}; @@ -23,7 +22,7 @@ use crate::task::{Context, Poll}; /// assert_eq!(read_future.await, "Hello, World!".to_owned()); /// # } /// ``` -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] pub fn poll_fn<T, F>(f: F) -> PollFn<F> where F: FnMut(&mut Context<'_>) -> Poll<T>, @@ -36,22 +35,22 @@ where /// This `struct` is created by [`poll_fn()`]. See its /// documentation for more. #[must_use = "futures do nothing unless you `.await` or poll them"] -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] pub struct PollFn<F> { f: F, } -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] impl<F> Unpin for PollFn<F> {} -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] impl<F> fmt::Debug for PollFn<F> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("PollFn").finish() } } -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] impl<T, F> Future for PollFn<F> where F: FnMut(&mut Context<'_>) -> Poll<T>, diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 5849a37444f..db94368f6e0 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -32,7 +32,6 @@ #![feature(fmt_internals)] #![feature(float_minimum_maximum)] #![feature(future_join)] -#![feature(future_poll_fn)] #![feature(generic_assert_internals)] #![feature(array_try_from_fn)] #![feature(hasher_prefixfree_extras)] |
