From 7980bc4bbc5f76b75264019dd18bff1da41a71e0 Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Tue, 4 Jun 2019 19:22:30 +0200 Subject: [PATCH] Hide gen_future API from documentation --- src/libstd/future.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libstd/future.rs b/src/libstd/future.rs index c18a314116bf0..0406549ff0791 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>(x: T) -> impl Future { 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); @@ -30,6 +32,7 @@ struct GenFuture>(T); // self-referential borrows in the underlying generator. impl> !Unpin for GenFuture {} +#[doc(hidden)] #[unstable(feature = "gen_future", issue = "50547")] impl> Future for GenFuture { 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(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: Pin<&mut F>) -> Poll