@@ -4,7 +4,8 @@ use crate::marker::Tuple;
4
4
/// An async-aware version of the [`Fn`](crate::ops::Fn) trait.
5
5
///
6
6
/// 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" ) ) ]
8
9
#[ rustc_paren_sugar]
9
10
#[ fundamental]
10
11
#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -18,7 +19,8 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
18
19
/// An async-aware version of the [`FnMut`](crate::ops::FnMut) trait.
19
20
///
20
21
/// 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" ) ) ]
22
24
#[ rustc_paren_sugar]
23
25
#[ fundamental]
24
26
#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -39,7 +41,8 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
39
41
/// An async-aware version of the [`FnOnce`](crate::ops::FnOnce) trait.
40
42
///
41
43
/// 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" ) ) ]
43
46
#[ rustc_paren_sugar]
44
47
#[ fundamental]
45
48
#[ must_use = "async closures are lazy and do nothing unless called" ]
@@ -64,7 +67,8 @@ mod impls {
64
67
use super :: { AsyncFn , AsyncFnMut , AsyncFnOnce } ;
65
68
use crate :: marker:: Tuple ;
66
69
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" ) ) ]
68
72
impl < A : Tuple , F : ?Sized > AsyncFn < A > for & F
69
73
where
70
74
F : AsyncFn < A > ,
@@ -74,7 +78,8 @@ mod impls {
74
78
}
75
79
}
76
80
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" ) ) ]
78
83
impl < A : Tuple , F : ?Sized > AsyncFnMut < A > for & F
79
84
where
80
85
F : AsyncFn < A > ,
@@ -89,7 +94,8 @@ mod impls {
89
94
}
90
95
}
91
96
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" ) ) ]
93
99
impl < ' a , A : Tuple , F : ?Sized > AsyncFnOnce < A > for & ' a F
94
100
where
95
101
F : AsyncFn < A > ,
@@ -102,7 +108,8 @@ mod impls {
102
108
}
103
109
}
104
110
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" ) ) ]
106
113
impl < A : Tuple , F : ?Sized > AsyncFnMut < A > for & mut F
107
114
where
108
115
F : AsyncFnMut < A > ,
@@ -117,7 +124,8 @@ mod impls {
117
124
}
118
125
}
119
126
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" ) ) ]
121
129
impl < ' a , A : Tuple , F : ?Sized > AsyncFnOnce < A > for & ' a mut F
122
130
where
123
131
F : AsyncFnMut < A > ,
0 commit comments