Skip to content

Commit

Permalink
Add lang items for AsyncFn's associated types
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 29, 2024
1 parent 1aaf0a9 commit 2e1896e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/ops/async_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down

0 comments on commit 2e1896e

Please sign in to comment.