Add lang items for AsyncFn's associated types
This commit is contained in:
@@ -26,6 +26,7 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
|
||||
pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
|
||||
/// Future returned by [`AsyncFnMut::async_call_mut`] and [`AsyncFn::async_call`].
|
||||
#[unstable(feature = "async_fn_traits", issue = "none")]
|
||||
#[cfg_attr(not(bootstrap), lang = "call_ref_future")]
|
||||
type CallRefFuture<'a>: Future<Output = Self::Output>
|
||||
where
|
||||
Self: 'a;
|
||||
@@ -46,10 +47,12 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
|
||||
pub trait AsyncFnOnce<Args: Tuple> {
|
||||
/// Future returned by [`AsyncFnOnce::async_call_once`].
|
||||
#[unstable(feature = "async_fn_traits", issue = "none")]
|
||||
#[cfg_attr(not(bootstrap), lang = "call_once_future")]
|
||||
type CallOnceFuture: Future<Output = Self::Output>;
|
||||
|
||||
/// Output type of the called closure's future.
|
||||
#[unstable(feature = "async_fn_traits", issue = "none")]
|
||||
#[cfg_attr(not(bootstrap), lang = "async_fn_once_output")]
|
||||
type Output;
|
||||
|
||||
/// Call the [`AsyncFnOnce`], returning a future which may move out of the called closure.
|
||||
|
||||
Reference in New Issue
Block a user