@@ -4,7 +4,8 @@ use crate::marker::Tuple;
44/// An async-aware version of the [`Fn`](crate::ops::Fn) trait.
55///
66/// All `async fn` and functions returning futures implement this trait.
7- #[ unstable( feature = "async_closure" , issue = "62290" ) ]
7+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
8+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
89#[ rustc_paren_sugar]
910#[ fundamental]
1011#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -18,7 +19,8 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
1819/// An async-aware version of the [`FnMut`](crate::ops::FnMut) trait.
1920///
2021/// All `async fn` and functions returning futures implement this trait.
21- #[ unstable( feature = "async_closure" , issue = "62290" ) ]
22+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
23+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
2224#[ rustc_paren_sugar]
2325#[ fundamental]
2426#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -39,7 +41,8 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
3941/// An async-aware version of the [`FnOnce`](crate::ops::FnOnce) trait.
4042///
4143/// All `async fn` and functions returning futures implement this trait.
42- #[ unstable( feature = "async_closure" , issue = "62290" ) ]
44+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
45+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
4346#[ rustc_paren_sugar]
4447#[ fundamental]
4548#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -64,7 +67,8 @@ mod impls {
6467 use super :: { AsyncFn , AsyncFnMut , AsyncFnOnce } ;
6568 use crate :: marker:: Tuple ;
6669
67- #[ unstable( feature = "async_fn_traits" , issue = "none" ) ]
70+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
71+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
6872 impl < A : Tuple , F : ?Sized > AsyncFn < A > for & F
6973 where
7074 F : AsyncFn < A > ,
@@ -74,7 +78,8 @@ mod impls {
7478 }
7579 }
7680
77- #[ unstable( feature = "async_fn_traits" , issue = "none" ) ]
81+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
82+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
7883 impl < A : Tuple , F : ?Sized > AsyncFnMut < A > for & F
7984 where
8085 F : AsyncFn < A > ,
@@ -89,7 +94,8 @@ mod impls {
8994 }
9095 }
9196
92- #[ unstable( feature = "async_fn_traits" , issue = "none" ) ]
97+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
98+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
9399 impl < ' a , A : Tuple , F : ?Sized > AsyncFnOnce < A > for & ' a F
94100 where
95101 F : AsyncFn < A > ,
@@ -102,7 +108,8 @@ mod impls {
102108 }
103109 }
104110
105- #[ unstable( feature = "async_fn_traits" , issue = "none" ) ]
111+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
112+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
106113 impl < A : Tuple , F : ?Sized > AsyncFnMut < A > for & mut F
107114 where
108115 F : AsyncFnMut < A > ,
@@ -117,7 +124,8 @@ mod impls {
117124 }
118125 }
119126
120- #[ unstable( feature = "async_fn_traits" , issue = "none" ) ]
127+ #[ cfg_attr( bootstrap, unstable( feature = "async_closure" , issue = "62290" ) ) ]
128+ #[ cfg_attr( not( bootstrap) , stable( feature = "async_closure" , since = "CURRENT_RUSTC_VERSION" ) ) ]
121129 impl < ' a , A : Tuple , F : ?Sized > AsyncFnOnce < A > for & ' a mut F
122130 where
123131 F : AsyncFnMut < A > ,
0 commit comments