diff options
| author | bors <bors@rust-lang.org> | 2018-06-23 09:02:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-06-23 09:02:45 +0000 |
| commit | 56e8f29dbe89f2109cacc8eb5e92ea3de32eefb9 (patch) | |
| tree | 8630b3d600677d35ce9c956fbfe12923b57e302d /src/libstd/lib.rs | |
| parent | 2ea922a96d676ff84cd78421d314e6aac305b5e9 (diff) | |
| parent | 30c17ccbffdbb88020e6ed42d89cc214fc3e6e5f (diff) | |
| download | rust-56e8f29dbe89f2109cacc8eb5e92ea3de32eefb9.tar.gz rust-56e8f29dbe89f2109cacc8eb5e92ea3de32eefb9.zip | |
Auto merge of #51580 - cramertj:async-await, r=eddyb
async/await This PR implements `async`/`await` syntax for `async fn` in Rust 2015 and `async` closures and `async` blocks in Rust 2018 (tracking issue: https://github.com/rust-lang/rust/issues/50547). Limitations: non-`move` async closures with arguments are currently not supported, nor are `async fn` with multiple different input lifetimes. These limitations are not fundamental and will be removed in the future, however I'd like to go ahead and get this PR merged so we can start experimenting with this in combination with futures 0.3. Based on https://github.com/rust-lang/rust/pull/51414. cc @petrochenkov for parsing changes. r? @eddyb
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index a6061e96ae5..caad924ea5b 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -263,6 +263,7 @@ #![feature(fn_traits)] #![feature(fnbox)] #![feature(futures_api)] +#![feature(generator_trait)] #![feature(hashmap_internals)] #![feature(int_error_internals)] #![feature(integer_atomics)] @@ -462,22 +463,6 @@ 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. - #[doc(inline)] - pub use core::task::*; - #[doc(inline)] - 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; @@ -499,6 +484,22 @@ pub mod process; pub mod sync; pub mod time; +#[unstable(feature = "futures_api", + reason = "futures in libcore are unstable", + issue = "50547")] +pub mod task { + //! Types and Traits for working with asynchronous tasks. + #[doc(inline)] + pub use core::task::*; + #[doc(inline)] + pub use alloc_crate::task::*; +} + +#[unstable(feature = "futures_api", + reason = "futures in libcore are unstable", + issue = "50547")] +pub mod future; + // Platform-abstraction modules #[macro_use] mod sys_common; |
