@@ -10,7 +10,6 @@ use crate::task::{Context, Poll};
10
10
/// # Examples
11
11
///
12
12
/// ```
13
- /// #![feature(future_poll_fn)]
14
13
/// # async fn run() {
15
14
/// use core::future::poll_fn;
16
15
/// use std::task::{Context, Poll};
@@ -23,7 +22,7 @@ use crate::task::{Context, Poll};
23
22
/// assert_eq!(read_future.await, "Hello, World!".to_owned());
24
23
/// # }
25
24
/// ```
26
- #[ unstable ( feature = "future_poll_fn" , issue = "72302 " ) ]
25
+ #[ stable ( feature = "future_poll_fn" , since = "1.64.0 " ) ]
27
26
pub fn poll_fn < T , F > ( f : F ) -> PollFn < F >
28
27
where
29
28
F : FnMut ( & mut Context < ' _ > ) -> Poll < T > ,
@@ -36,22 +35,22 @@ where
36
35
/// This `struct` is created by [`poll_fn()`]. See its
37
36
/// documentation for more.
38
37
#[ 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 " ) ]
40
39
pub struct PollFn < F > {
41
40
f : F ,
42
41
}
43
42
44
- #[ unstable ( feature = "future_poll_fn" , issue = "72302 " ) ]
43
+ #[ stable ( feature = "future_poll_fn" , since = "1.64.0 " ) ]
45
44
impl < F > Unpin for PollFn < F > { }
46
45
47
- #[ unstable ( feature = "future_poll_fn" , issue = "72302 " ) ]
46
+ #[ stable ( feature = "future_poll_fn" , since = "1.64.0 " ) ]
48
47
impl < F > fmt:: Debug for PollFn < F > {
49
48
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
50
49
f. debug_struct ( "PollFn" ) . finish ( )
51
50
}
52
51
}
53
52
54
- #[ unstable ( feature = "future_poll_fn" , issue = "72302 " ) ]
53
+ #[ stable ( feature = "future_poll_fn" , since = "1.64.0 " ) ]
55
54
impl < T , F > Future for PollFn < F >
56
55
where
57
56
F : FnMut ( & mut Context < ' _ > ) -> Poll < T > ,
0 commit comments