Change:
<!-- Thank you for creating a tracking issue! Tracking issues are for tracking a feature from implementation to stabilisation. Make sure to include the relevant RFC for the feature if it has one. Otherwise provide a short summary of the feature and link any relevant PRs or issues, and remove any sections that are not relevant to the feature. Remember to add team labels to the tracking issue. For a language team feature, this would e.g., be . Such a feature should also be labeled with e.g., . This label is used to associate issues (e.g., bugs and design questions) to the feature. --The feature gate for the issue is . <!-- Include each step required to complete the feature. Typically this is a PR implementing a feature, followed by a PR that stabilises the feature. However for larger features an implementation could be broken up into multiple PRs. --- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide]) [ ] Stabilization PR () [stabilization-guide]: https://rustc-dev- [doc-guide]: https://rustc-dev- <!-- Include any open questions that need to be answered before the feature can be stabilised. --- Should this be named instead? <!-- Include a list of all the PRs that were involved in implementing the feature. --- Initial implementation in - closed as it's ambiguous, see the discussion on that PR
This exists in futures-lite, and people use it. It seems worth having available in the standard library. The naming discussion doesn't seem likely to change, and all else being equal there's a history for the name . Shall we stabilize this? merge
Team member has proposed to merge this. The next step is review by the rest of the tagged team members: [x] [x] [x] [x] [ ] [ ] No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the . :bell:
The final comment period, with a disposition to merge, as per the , is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon.
There are some soundness issues with (not strictly speaking a soundness bug, but we might still want to do a breaking change now before there are too many people relying on this): the fact that is always is a problem. It should require for that. See for details, in particular .
I am proposing to change the impl in

Discussion:
/// # Examples /// /// ``` <del> /// #![feature(future_join, future_poll_fn)] </del> <ins> /// #![feature(future_join)] </ins> /// /// use std::future::join; ///

/// `join!` is variadic, so you can pass any number of futures: /// /// ``` <del> /// #![feature(future_join, future_poll_fn)] </del> <ins> /// #![feature(future_join)] </ins> /// /// use std::future::join; ///

#[stable(feature = "future_readiness_fns", since = "1.48.0")] pub use ready::{ready, Ready}; <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> pub use poll_fn::{poll_fn, PollFn}; /// This type is needed because:

/// # Examples /// /// ``` <del> /// #![feature(future_poll_fn)] </del> /// # async fn run() { /// use core::future::poll_fn; /// use std::task::{Context, Poll};

/// assert_eq!(read_future.await, "Hello, World!".to_owned()); /// # } /// ``` <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> pub fn poll_fn<T, F>(f: F) -> PollFn<F> where F: FnMut(&mut Context<'_>) -> Poll<T>,

/// This `struct` is created by [`poll_fn()`]. See its /// documentation for more. #[must_use = "futures do nothing unless you `.await` or poll them"] <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> pub struct PollFn<F> { f: F, } <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> impl<F> Unpin for PollFn<F> {} <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> impl<F> fmt::Debug for PollFn<F> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("PollFn").finish() } } <del> #[unstable(feature = "future_poll_fn", issue = "72302")] </del> <ins> #[stable(feature = "future_poll_fn", since = "1.64.0")] </ins> impl<T, F> Future for PollFn<F> where F: FnMut(&mut Context<'_>) -> Poll<T>,

#![feature(fmt_internals)] #![feature(float_minimum_maximum)] #![feature(future_join)] <del> #![feature(future_poll_fn)] </del> #![feature(generic_assert_internals)] #![feature(array_try_from_fn)] #![feature(hasher_prefixfree_extras)]