diff --git a/core/src/future/join.rs b/core/src/future/join.rs index fa4eb0d2f..35f0dea06 100644 --- a/core/src/future/join.rs +++ b/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/core/src/future/mod.rs b/core/src/future/mod.rs index 90eecb9d4..6487aa088 100644 --- a/core/src/future/mod.rs +++ b/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/core/src/future/poll_fn.rs b/core/src/future/poll_fn.rs index 9ae118e29..db2a52332 100644 --- a/core/src/future/poll_fn.rs +++ b/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(f: F) -> PollFn where F: FnMut(&mut Context<'_>) -> Poll, @@ -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, } -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] impl Unpin for PollFn {} -#[unstable(feature = "future_poll_fn", issue = "72302")] +#[stable(feature = "future_poll_fn", since = "1.64.0")] impl fmt::Debug for PollFn { 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 Future for PollFn where F: FnMut(&mut Context<'_>) -> Poll, diff --git a/core/tests/lib.rs b/core/tests/lib.rs index 5849a3744..db94368f6 100644 --- a/core/tests/lib.rs +++ b/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)]