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
This commit is contained in:
commit
19d0b539aa
8 changed files with 961 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue