@@ -16,12 +16,14 @@ pub use core::future::*;
1616///
1717/// This function returns a `GenFuture` underneath, but hides it in `impl Trait` to give
1818/// better error messages (`impl Future` rather than `GenFuture<[closure.....]>`).
19+ #[ doc( hidden) ]
1920#[ unstable( feature = "gen_future" , issue = "50547" ) ]
2021pub fn from_generator < T : Generator < Yield = ( ) > > ( x : T ) -> impl Future < Output = T :: Return > {
2122 GenFuture ( x)
2223}
2324
2425/// A wrapper around generators used to implement `Future` for `async`/`await` code.
26+ #[ doc( hidden) ]
2527#[ unstable( feature = "gen_future" , issue = "50547" ) ]
2628#[ derive( Copy , Clone , Debug , Eq , PartialEq , Ord , PartialOrd , Hash ) ]
2729struct GenFuture < T : Generator < Yield = ( ) > > ( T ) ;
@@ -30,6 +32,7 @@ struct GenFuture<T: Generator<Yield = ()>>(T);
3032// self-referential borrows in the underlying generator.
3133impl < T : Generator < Yield = ( ) > > !Unpin for GenFuture < T > { }
3234
35+ #[ doc( hidden) ]
3336#[ unstable( feature = "gen_future" , issue = "50547" ) ]
3437impl < T : Generator < Yield = ( ) > > Future for GenFuture < T > {
3538 type Output = T :: Return ;
@@ -57,6 +60,7 @@ impl Drop for SetOnDrop {
5760 }
5861}
5962
63+ #[ doc( hidden) ]
6064#[ unstable( feature = "gen_future" , issue = "50547" ) ]
6165/// Sets the thread-local task context used by async/await futures.
6266pub fn set_task_context < F , R > ( cx : & mut Context < ' _ > , f : F ) -> R
7478 f ( )
7579}
7680
81+ #[ doc( hidden) ]
7782#[ unstable( feature = "gen_future" , issue = "50547" ) ]
7883/// Retrieves the thread-local task context used by async/await futures.
7984///
@@ -105,6 +110,7 @@ where
105110 unsafe { f ( cx_ptr. as_mut ( ) ) }
106111}
107112
113+ #[ doc( hidden) ]
108114#[ unstable( feature = "gen_future" , issue = "50547" ) ]
109115/// Polls a future in the current thread-local task waker.
110116pub fn poll_with_tls_context < F > ( f : Pin < & mut F > ) -> Poll < F :: Output >
0 commit comments