Skip to content

Commit 8c18a11

Browse files
authored
Rollup merge of #99306 - JohnTitor:stabilize-future-poll-fn, r=joshtriplett
Stabilize `future_poll_fn` FCP is done: rust-lang/rust#72302 (comment) Closes #72302 r? `@joshtriplett` as you started FCP Signed-off-by: Yuki Okushi <[email protected]>
2 parents cb31055 + 2dc288f commit 8c18a11

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

core/src/future/join.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::task::{Context, Poll};
1515
/// # Examples
1616
///
1717
/// ```
18-
/// #![feature(future_join, future_poll_fn)]
18+
/// #![feature(future_join)]
1919
///
2020
/// use std::future::join;
2121
///
@@ -31,7 +31,7 @@ use crate::task::{Context, Poll};
3131
/// `join!` is variadic, so you can pass any number of futures:
3232
///
3333
/// ```
34-
/// #![feature(future_join, future_poll_fn)]
34+
/// #![feature(future_join)]
3535
///
3636
/// use std::future::join;
3737
///

core/src/future/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub use pending::{pending, Pending};
3737
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
3838
pub use ready::{ready, Ready};
3939

40-
#[unstable(feature = "future_poll_fn", issue = "72302")]
40+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
4141
pub use poll_fn::{poll_fn, PollFn};
4242

4343
/// This type is needed because:

core/src/future/poll_fn.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use crate::task::{Context, Poll};
1010
/// # Examples
1111
///
1212
/// ```
13-
/// #![feature(future_poll_fn)]
1413
/// # async fn run() {
1514
/// use core::future::poll_fn;
1615
/// use std::task::{Context, Poll};
@@ -23,7 +22,7 @@ use crate::task::{Context, Poll};
2322
/// assert_eq!(read_future.await, "Hello, World!".to_owned());
2423
/// # }
2524
/// ```
26-
#[unstable(feature = "future_poll_fn", issue = "72302")]
25+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
2726
pub fn poll_fn<T, F>(f: F) -> PollFn<F>
2827
where
2928
F: FnMut(&mut Context<'_>) -> Poll<T>,
@@ -36,22 +35,22 @@ where
3635
/// This `struct` is created by [`poll_fn()`]. See its
3736
/// documentation for more.
3837
#[must_use = "futures do nothing unless you `.await` or poll them"]
39-
#[unstable(feature = "future_poll_fn", issue = "72302")]
38+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
4039
pub struct PollFn<F> {
4140
f: F,
4241
}
4342

44-
#[unstable(feature = "future_poll_fn", issue = "72302")]
43+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
4544
impl<F> Unpin for PollFn<F> {}
4645

47-
#[unstable(feature = "future_poll_fn", issue = "72302")]
46+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
4847
impl<F> fmt::Debug for PollFn<F> {
4948
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5049
f.debug_struct("PollFn").finish()
5150
}
5251
}
5352

54-
#[unstable(feature = "future_poll_fn", issue = "72302")]
53+
#[stable(feature = "future_poll_fn", since = "1.64.0")]
5554
impl<T, F> Future for PollFn<F>
5655
where
5756
F: FnMut(&mut Context<'_>) -> Poll<T>,

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#![feature(fmt_internals)]
3333
#![feature(float_minimum_maximum)]
3434
#![feature(future_join)]
35-
#![feature(future_poll_fn)]
3635
#![feature(generic_assert_internals)]
3736
#![feature(array_try_from_fn)]
3837
#![feature(hasher_prefixfree_extras)]

0 commit comments

Comments
 (0)