Skip to content

Commit 4c03241

Browse files
authored
Rollup merge of rust-lang#98718 - yoshuawuyts:stabilize-into-future, r=yaahc
Stabilize `into_future` rust-lang#67644 has been labeled with [S-tracking-ready-to-stabilize](https://github.com/rust-lang/rust/labels/S-tracking-ready-to-stabilize) - which mentions someone needs to file a stabilization PR. So hence this PR! ✨ Thanks! Closes rust-lang#67644 r? ``@joshtriplett``
2 parents 5fbe1de + f709ec0 commit 4c03241

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

Diff for: core/src/future/into_future.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use crate::future::Future;
1313
/// on all futures.
1414
///
1515
/// ```no_run
16-
/// #![feature(into_future)]
17-
///
1816
/// use std::future::IntoFuture;
1917
///
2018
/// # async fn foo() {
@@ -33,8 +31,6 @@ use crate::future::Future;
3331
/// multiple times before being `.await`ed.
3432
///
3533
/// ```rust
36-
/// #![feature(into_future)]
37-
///
3834
/// use std::future::{ready, Ready, IntoFuture};
3935
///
4036
/// /// Eventually multiply two numbers
@@ -91,8 +87,6 @@ use crate::future::Future;
9187
/// `IntoFuture::into_future` to obtain an instance of `Future`:
9288
///
9389
/// ```rust
94-
/// #![feature(into_future)]
95-
///
9690
/// use std::future::IntoFuture;
9791
///
9892
/// /// Convert the output of a future to a string.
@@ -104,14 +98,14 @@ use crate::future::Future;
10498
/// format!("{:?}", fut.await)
10599
/// }
106100
/// ```
107-
#[unstable(feature = "into_future", issue = "67644")]
101+
#[stable(feature = "into_future", since = "1.64.0")]
108102
pub trait IntoFuture {
109103
/// The output that the future will produce on completion.
110-
#[unstable(feature = "into_future", issue = "67644")]
104+
#[stable(feature = "into_future", since = "1.64.0")]
111105
type Output;
112106

113107
/// Which kind of future are we turning this into?
114-
#[unstable(feature = "into_future", issue = "67644")]
108+
#[stable(feature = "into_future", since = "1.64.0")]
115109
type IntoFuture: Future<Output = Self::Output>;
116110

117111
/// Creates a future from a value.
@@ -121,8 +115,6 @@ pub trait IntoFuture {
121115
/// Basic usage:
122116
///
123117
/// ```no_run
124-
/// #![feature(into_future)]
125-
///
126118
/// use std::future::IntoFuture;
127119
///
128120
/// # async fn foo() {
@@ -131,12 +123,12 @@ pub trait IntoFuture {
131123
/// assert_eq!("meow", fut.await);
132124
/// # }
133125
/// ```
134-
#[unstable(feature = "into_future", issue = "67644")]
126+
#[stable(feature = "into_future", since = "1.64.0")]
135127
#[lang = "into_future"]
136128
fn into_future(self) -> Self::IntoFuture;
137129
}
138130

139-
#[unstable(feature = "into_future", issue = "67644")]
131+
#[stable(feature = "into_future", since = "1.64.0")]
140132
impl<F: Future> IntoFuture for F {
141133
type Output = F::Output;
142134
type IntoFuture = F;

Diff for: core/src/future/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub use self::future::Future;
2929
#[unstable(feature = "future_join", issue = "91642")]
3030
pub use self::join::join;
3131

32-
#[unstable(feature = "into_future", issue = "67644")]
32+
#[stable(feature = "into_future", since = "1.64.0")]
3333
pub use into_future::IntoFuture;
3434

3535
#[stable(feature = "future_readiness_fns", since = "1.48.0")]

0 commit comments

Comments
 (0)