@@ -461,9 +461,6 @@ declare_features! (
461461 // Allows using `#[doc(keyword = "...")]`.
462462 ( active, doc_keyword, "1.28.0" , Some ( 51315 ) , None ) ,
463463
464- // Allows async and await syntax.
465- ( active, async_await, "1.28.0" , Some ( 50547 ) , None ) ,
466-
467464 // Allows reinterpretation of the bits of a value of one type as another type during const eval.
468465 ( active, const_transmute, "1.29.0" , Some ( 53605 ) , None ) ,
469466
@@ -857,6 +854,8 @@ declare_features! (
857854 ( accepted, repr_align_enum, "1.37.0" , Some ( 57996 ) , None ) ,
858855 // Allows `const _: TYPE = VALUE`.
859856 ( 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 ) ,
860859
861860 // -------------------------------------------------------------------------
862861 // feature-group-end: accepted features
@@ -2100,12 +2099,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
21002099 "labels on blocks are unstable" ) ;
21012100 }
21022101 }
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- }
21092102 _ => { }
21102103 }
21112104 visit:: walk_expr ( self , e)
@@ -2154,11 +2147,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
21542147 span : Span ,
21552148 _node_id : NodeId ) {
21562149 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-
21622150 // Stability of const fn methods are covered in
21632151 // `visit_trait_item` and `visit_impl_item` below; this is
21642152 // because default methods don't pass through this point.
@@ -2198,9 +2186,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
21982186 if block. is_none ( ) {
21992187 self . check_abi ( sig. header . abi , ti. span ) ;
22002188 }
2201- if sig. header . asyncness . node . is_async ( ) {
2202- gate_feature_post ! ( & self , async_await, ti. span, "async fn is unstable" ) ;
2203- }
22042189 if sig. decl . c_variadic {
22052190 gate_feature_post ! ( & self , c_variadic, ti. span,
22062191 "C-variadic functions are unstable" ) ;
0 commit comments