diff options
| author | bors <bors@rust-lang.org> | 2019-06-04 23:05:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-04 23:05:05 +0000 |
| commit | 81eb15210a0c43820b146cd9ae6fd2062e1b2922 (patch) | |
| tree | 7c0f6790211f9ac4432493b877532e1cbb345db1 /src/libstd | |
| parent | 5d8f59f4b1473217c2de7e02330b5aaae70a1668 (diff) | |
| parent | e83dcebe4fe53fa7826d87b0814751a5c726ba35 (diff) | |
| download | rust-81eb15210a0c43820b146cd9ae6fd2062e1b2922.tar.gz rust-81eb15210a0c43820b146cd9ae6fd2062e1b2922.zip | |
Auto merge of #61527 - pietroalbini:rollup-vhxyqlk, r=pietroalbini
Rollup of 5 pull requests Successful merges: - #61069 (Make MIR drop terminators borrow the dropped location) - #61453 (Remove unneeded feature attr from atomic integers doctests) - #61488 (Fix NLL typeck ICEs) - #61500 (Fix regression 61475) - #61523 (Hide gen_future API from documentation) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/future.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/future.rs b/src/libstd/future.rs index c18a314116b..0406549ff07 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -16,12 +16,14 @@ pub use core::future::*; /// /// This function returns a `GenFuture` underneath, but hides it in `impl Trait` to give /// better error messages (`impl Future` rather than `GenFuture<[closure.....]>`). +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] pub fn from_generator<T: Generator<Yield = ()>>(x: T) -> impl Future<Output = T::Return> { GenFuture(x) } /// A wrapper around generators used to implement `Future` for `async`/`await` code. +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] struct GenFuture<T: Generator<Yield = ()>>(T); @@ -30,6 +32,7 @@ struct GenFuture<T: Generator<Yield = ()>>(T); // self-referential borrows in the underlying generator. impl<T: Generator<Yield = ()>> !Unpin for GenFuture<T> {} +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] impl<T: Generator<Yield = ()>> Future for GenFuture<T> { type Output = T::Return; @@ -57,6 +60,7 @@ impl Drop for SetOnDrop { } } +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] /// Sets the thread-local task context used by async/await futures. pub fn set_task_context<F, R>(cx: &mut Context<'_>, f: F) -> R @@ -74,6 +78,7 @@ where f() } +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] /// Retrieves the thread-local task context used by async/await futures. /// @@ -105,6 +110,7 @@ where unsafe { f(cx_ptr.as_mut()) } } +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] /// Polls a future in the current thread-local task waker. pub fn poll_with_tls_context<F>(f: Pin<&mut F>) -> Poll<F::Output> |
