diff options
| author | Taylor Cramer <cramertj@google.com> | 2019-04-05 14:14:19 -0700 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2019-04-23 16:13:53 -0700 |
| commit | 3f966dcd53faabd8313d29a4e1ba2464995e624a (patch) | |
| tree | c3f73c87a32335ab5b88aa889bc977598d90eb1f /src/libcore/future | |
| parent | e617025e96fa95f074291a1cc284235a80824eaf (diff) | |
| download | rust-3f966dcd53faabd8313d29a4e1ba2464995e624a.tar.gz rust-3f966dcd53faabd8313d29a4e1ba2464995e624a.zip | |
Stabilize futures_api
Diffstat (limited to 'src/libcore/future')
| -rw-r--r-- | src/libcore/future/future.rs | 9 | ||||
| -rw-r--r-- | src/libcore/future/mod.rs | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libcore/future/future.rs b/src/libcore/future/future.rs index e1ab67873a0..504330a023b 100644 --- a/src/libcore/future/future.rs +++ b/src/libcore/future/future.rs @@ -1,6 +1,4 @@ -#![unstable(feature = "futures_api", - reason = "futures in libcore are unstable", - issue = "50547")] +#![stable(feature = "futures_api", since = "1.36.0")] use crate::marker::Unpin; use crate::ops; @@ -26,8 +24,10 @@ use crate::task::{Context, Poll}; /// `await!` the value. #[doc(spotlight)] #[must_use = "futures do nothing unless polled"] +#[stable(feature = "futures_api", since = "1.36.0")] pub trait Future { /// The type of value produced on completion. + #[stable(feature = "futures_api", since = "1.36.0")] type Output; /// Attempt to resolve the future to a final value, registering @@ -92,9 +92,11 @@ pub trait Future { /// [`Context`]: ../task/struct.Context.html /// [`Waker`]: ../task/struct.Waker.html /// [`Waker::wake`]: ../task/struct.Waker.html#method.wake + #[stable(feature = "futures_api", since = "1.36.0")] fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>; } +#[stable(feature = "futures_api", since = "1.36.0")] impl<F: ?Sized + Future + Unpin> Future for &mut F { type Output = F::Output; @@ -103,6 +105,7 @@ impl<F: ?Sized + Future + Unpin> Future for &mut F { } } +#[stable(feature = "futures_api", since = "1.36.0")] impl<P> Future for Pin<P> where P: Unpin + ops::DerefMut, diff --git a/src/libcore/future/mod.rs b/src/libcore/future/mod.rs index 6693ecbac41..89ea4713cfd 100644 --- a/src/libcore/future/mod.rs +++ b/src/libcore/future/mod.rs @@ -1,8 +1,7 @@ -#![unstable(feature = "futures_api", - reason = "futures in libcore are unstable", - issue = "50547")] +#![stable(feature = "futures_api", since = "1.36.0")] //! Asynchronous values. mod future; +#[stable(feature = "futures_api", since = "1.36.0")] pub use self::future::Future; |
