summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-06 19:42:19 +0000
committerbors <bors@rust-lang.org>2018-06-06 19:42:19 +0000
commit19d0b539aa295468a3fde57a02413244f03ab6f6 (patch)
tree040ec289e4fb6f623fc645eca86a3bc749cfc6a7 /src/libstd
parentcb8ab33ed29544973da866bdc3eff509b3c3e789 (diff)
parenta6055c885917093faf37bcb834350df7b6ddca82 (diff)
downloadrust-19d0b539aa295468a3fde57a02413244f03ab6f6.tar.gz
rust-19d0b539aa295468a3fde57a02413244f03ab6f6.zip
Auto merge of #51263 - cramertj:futures-in-core, r=aturon
Add Future and task system to the standard library

This adds preliminary versions of the `std::future` and `std::task` modules in order to unblock development of async/await (https://github.com/rust-lang/rust/issues/50547). These shouldn't be considered as final forms of these libraries-- design questions about the libraries should be left on https://github.com/rust-lang/rfcs/pull/2418. Once that RFC (or a successor) is merged, these APIs will be adjusted as necessary.

r? @aturon
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 8266cec5139..7bbc99b83be 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -261,6 +261,7 @@
 #![feature(float_from_str_radix)]
 #![feature(fn_traits)]
 #![feature(fnbox)]
+#![feature(futures_api)]
 #![feature(hashmap_internals)]
 #![feature(heap_api)]
 #![feature(int_error_internals)]
@@ -282,6 +283,7 @@
 #![feature(panic_internals)]
 #![feature(panic_unwind)]
 #![feature(peek)]
+#![feature(pin)]
 #![feature(placement_new_protocol)]
 #![feature(prelude_import)]
 #![feature(ptr_internals)]
@@ -460,6 +462,20 @@ pub use core::u128;
 #[stable(feature = "core_hint", since = "1.27.0")]
 pub use core::hint;
 
+#[unstable(feature = "futures_api",
+           reason = "futures in libcore are unstable",
+           issue = "50547")]
+pub mod task {
+    //! Types and Traits for working with asynchronous tasks.
+    pub use core::task::*;
+    pub use alloc_crate::task::*;
+}
+
+#[unstable(feature = "futures_api",
+           reason = "futures in libcore are unstable",
+           issue = "50547")]
+pub use core::future;
+
 pub mod f32;
 pub mod f64;