Skip to content

Commit 73ae685

Browse files
select AsyncFn traits during overloaded call op
1 parent 5a6283f commit 73ae685

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/ops/async_function.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::marker::Tuple;
88
#[rustc_paren_sugar]
99
#[fundamental]
1010
#[must_use = "async closures are lazy and do nothing unless called"]
11+
#[cfg_attr(not(bootstrap), lang = "async_fn")]
1112
pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
1213
/// Future returned by [`AsyncFn::async_call`].
1314
#[unstable(feature = "async_fn_traits", issue = "none")]
@@ -27,6 +28,7 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
2728
#[rustc_paren_sugar]
2829
#[fundamental]
2930
#[must_use = "async closures are lazy and do nothing unless called"]
31+
#[cfg_attr(not(bootstrap), lang = "async_fn_mut")]
3032
pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
3133
/// Future returned by [`AsyncFnMut::async_call_mut`].
3234
#[unstable(feature = "async_fn_traits", issue = "none")]
@@ -46,6 +48,7 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
4648
#[rustc_paren_sugar]
4749
#[fundamental]
4850
#[must_use = "async closures are lazy and do nothing unless called"]
51+
#[cfg_attr(not(bootstrap), lang = "async_fn_once")]
4952
pub trait AsyncFnOnce<Args: Tuple> {
5053
/// Future returned by [`AsyncFnOnce::async_call_once`].
5154
#[unstable(feature = "async_fn_traits", issue = "none")]

0 commit comments

Comments
 (0)