about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-20 18:33:16 +0000
committerbors <bors@rust-lang.org>2019-08-20 18:33:16 +0000
commitbea0372a1a7a31b81f28cc4d9a83a2dc9a79d008 (patch)
tree49f35638545ccd98762e91fc712d09533ad869e5 /src/libsyntax
parent5a56e05abd34e1936df74625c1f40cb6fee0cd4a (diff)
parente3e8b7f12a5cdf4dbd3fa8a4a39b1bd4bce13d82 (diff)
downloadrust-bea0372a1a7a31b81f28cc4d9a83a2dc9a79d008.tar.gz
rust-bea0372a1a7a31b81f28cc4d9a83a2dc9a79d008.zip
Auto merge of #63752 - Centril:rollup-nlxwety, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #62497 (Fix double resolving custom libdir)
 - #63209 (Stabilize `async_await` in Rust 1.39.0)
 - #63746 (Cherry-pick src/test changes with Centril's changes)
 - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index bbc3ae28225..bce0b07db1c 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -461,9 +461,6 @@ declare_features! (
     // Allows using `#[doc(keyword = "...")]`.
     (active, doc_keyword, "1.28.0", Some(51315), None),
 
-    // Allows async and await syntax.
-    (active, async_await, "1.28.0", Some(50547), None),
-
     // Allows reinterpretation of the bits of a value of one type as another type during const eval.
     (active, const_transmute, "1.29.0", Some(53605), None),
 
@@ -857,6 +854,8 @@ declare_features! (
     (accepted, repr_align_enum, "1.37.0", Some(57996), None),
     // Allows `const _: TYPE = VALUE`.
     (accepted, underscore_const_names, "1.37.0", Some(54912), None),
+    // Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
+    (accepted, async_await, "1.38.0", Some(50547), None),
 
     // -------------------------------------------------------------------------
     // feature-group-end: accepted features
@@ -2100,12 +2099,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                                     "labels on blocks are unstable");
                 }
             }
-            ast::ExprKind::Async(..) => {
-                gate_feature_post!(&self, async_await, e.span, "async blocks are unstable");
-            }
-            ast::ExprKind::Await(_) => {
-                gate_feature_post!(&self, async_await, e.span, "async/await is unstable");
-            }
             _ => {}
         }
         visit::walk_expr(self, e)
@@ -2154,11 +2147,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 span: Span,
                 _node_id: NodeId) {
         if let Some(header) = fn_kind.header() {
-            // Check for const fn and async fn declarations.
-            if header.asyncness.node.is_async() {
-                gate_feature_post!(&self, async_await, span, "async fn is unstable");
-            }
-
             // Stability of const fn methods are covered in
             // `visit_trait_item` and `visit_impl_item` below; this is
             // because default methods don't pass through this point.
@@ -2198,9 +2186,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 if block.is_none() {
                     self.check_abi(sig.header.abi, ti.span);
                 }
-                if sig.header.asyncness.node.is_async() {
-                    gate_feature_post!(&self, async_await, ti.span, "async fn is unstable");
-                }
                 if sig.decl.c_variadic {
                     gate_feature_post!(&self, c_variadic, ti.span,
                                        "C-variadic functions are unstable");