about summary refs log tree commit diff
path: root/src/libcore/future/mod.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-22 21:45:01 +0200
committerGitHub <noreply@github.com>2020-05-22 21:45:01 +0200
commit141ce5f2ad043efdf902d0d005b7a9bfa8cb63c4 (patch)
tree19746f2ce7064656b14dd158429020b5e769cad4 /src/libcore/future/mod.rs
parent3083ce7ab127dfd1cbb453810579ca827dcfd7bb (diff)
parent9ff502029d379bebc50cf92a97f019fefba09d79 (diff)
Rollup merge of #72459 - yoshuawuyts:into-future, r=nikomatsakis
Add core::future::IntoFuture

This patch reintroduces the `core::future::IntoFuture` trait. However unlike earlier PRs this patch does not integrate it into the `async/.await` lowering since that lead to performance regressions. By introducing the trait separately from the integration, the integration PR can be more narrowly scoped, and people can start trying out the `IntoFuture` trait today. Thanks heaps!

cc/ @rust-lang/wg-async-foundations

## References
- Original PR adding `IntoFuture` https://github.com/rust-lang/rust/pull/65244
- Open issue to re-land `IntoFuture` (assigned to me) https://github.com/rust-lang/rust/issues/67982
- Tracking issue for `IntoFuture` https://github.com/rust-lang/rust/issues/67644
Diffstat (limited to 'src/libcore/future/mod.rs')
-rw-r--r--src/libcore/future/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/future/mod.rs b/src/libcore/future/mod.rs
index b5a102916a0..6f6009b47e6 100644
--- a/src/libcore/future/mod.rs
+++ b/src/libcore/future/mod.rs
@@ -10,12 +10,16 @@ use crate::{
 };
 
 mod future;
+mod into_future;
 mod pending;
 mod ready;
 
 #[stable(feature = "futures_api", since = "1.36.0")]
 pub use self::future::Future;
 
+#[unstable(feature = "into_future", issue = "67644")]
+pub use into_future::IntoFuture;
+
 #[unstable(feature = "future_readiness_fns", issue = "70921")]
 pub use pending::{pending, Pending};
 #[unstable(feature = "future_readiness_fns", issue = "70921")]