]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/future/future.rs
parser: move `ban_async_in_2015` to `fn` parsing & improve it.
[rust.git] / src / libcore / future / future.rs
index dcb819f9381a487e12ee32307429b7f31840dec6..f14ed38b9b0f27c4c5a39bd8450b466a4d07cc3d 100644 (file)
@@ -99,21 +99,6 @@ pub trait Future {
     fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
 }
 
-/// Conversion into a `Future`.
-#[unstable(feature = "into_future", issue = "67644")]
-pub trait IntoFuture {
-    /// The output that the future will produce on completion.
-    #[unstable(feature = "into_future", issue = "67644")]
-    type Output;
-    /// Which kind of future are we turning this into?
-    #[unstable(feature = "into_future", issue = "67644")]
-    type Future: Future<Output = Self::Output>;
-
-    /// Creates a future from a value.
-    #[unstable(feature = "into_future", issue = "67644")]
-    fn into_future(self) -> Self::Future;
-}
-
 #[stable(feature = "futures_api", since = "1.36.0")]
 impl<F: ?Sized + Future + Unpin> Future for &mut F {
     type Output = F::Output;
@@ -134,13 +119,3 @@ fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
         Pin::get_mut(self).as_mut().poll(cx)
     }
 }
-
-#[unstable(feature = "into_future", issue = "67644")]
-impl<F: Future> IntoFuture for F {
-    type Output = F::Output;
-    type Future = F;
-
-    fn into_future(self) -> Self::Future {
-        self
-    }
-}