@@ -461,9 +461,6 @@ declare_features! (
461
461
// Allows using `#[doc(keyword = "...")]`.
462
462
( active, doc_keyword, "1.28.0" , Some ( 51315 ) , None ) ,
463
463
464
- // Allows async and await syntax.
465
- ( active, async_await, "1.28.0" , Some ( 50547 ) , None ) ,
466
-
467
464
// Allows reinterpretation of the bits of a value of one type as another type during const eval.
468
465
( active, const_transmute, "1.29.0" , Some ( 53605 ) , None ) ,
469
466
@@ -857,6 +854,8 @@ declare_features! (
857
854
( accepted, repr_align_enum, "1.37.0" , Some ( 57996 ) , None ) ,
858
855
// Allows `const _: TYPE = VALUE`.
859
856
( accepted, underscore_const_names, "1.37.0" , Some ( 54912 ) , None ) ,
857
+ // Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
858
+ ( accepted, async_await, "1.38.0" , Some ( 50547 ) , None ) ,
860
859
861
860
// -------------------------------------------------------------------------
862
861
// feature-group-end: accepted features
@@ -2100,12 +2099,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
2100
2099
"labels on blocks are unstable" ) ;
2101
2100
}
2102
2101
}
2103
- ast:: ExprKind :: Async ( ..) => {
2104
- gate_feature_post ! ( & self , async_await, e. span, "async blocks are unstable" ) ;
2105
- }
2106
- ast:: ExprKind :: Await ( _) => {
2107
- gate_feature_post ! ( & self , async_await, e. span, "async/await is unstable" ) ;
2108
- }
2109
2102
_ => { }
2110
2103
}
2111
2104
visit:: walk_expr ( self , e)
@@ -2154,11 +2147,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
2154
2147
span : Span ,
2155
2148
_node_id : NodeId ) {
2156
2149
if let Some ( header) = fn_kind. header ( ) {
2157
- // Check for const fn and async fn declarations.
2158
- if header. asyncness . node . is_async ( ) {
2159
- gate_feature_post ! ( & self , async_await, span, "async fn is unstable" ) ;
2160
- }
2161
-
2162
2150
// Stability of const fn methods are covered in
2163
2151
// `visit_trait_item` and `visit_impl_item` below; this is
2164
2152
// because default methods don't pass through this point.
@@ -2198,9 +2186,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
2198
2186
if block. is_none ( ) {
2199
2187
self . check_abi ( sig. header . abi , ti. span ) ;
2200
2188
}
2201
- if sig. header . asyncness . node . is_async ( ) {
2202
- gate_feature_post ! ( & self , async_await, ti. span, "async fn is unstable" ) ;
2203
- }
2204
2189
if sig. decl . c_variadic {
2205
2190
gate_feature_post ! ( & self , c_variadic, ti. span,
2206
2191
"C-variadic functions are unstable" ) ;
0 commit comments