1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use crate::future::Future;
#[unstable(feature = "into_future", issue = "67644")]
pub trait IntoFuture {
#[unstable(feature = "into_future", issue = "67644")]
type Output;
#[unstable(feature = "into_future", issue = "67644")]
type IntoFuture: Future<Output = Self::Output>;
#[unstable(feature = "into_future", issue = "67644")]
#[lang = "into_future"]
fn into_future(self) -> Self::IntoFuture;
}
#[unstable(feature = "into_future", issue = "67644")]
impl<F: Future> IntoFuture for F {
type Output = F::Output;
type IntoFuture = F;
fn into_future(self) -> Self::IntoFuture {
self
}
}