about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-26 07:38:19 +0000
committerbors <bors@rust-lang.org>2018-09-26 07:38:19 +0000
commita2b27c19dad8b90063b56eff7b6433ba3f390d96 (patch)
treee5c2b57922beb88af06a57fff1a4114d5e3443ba /src/libsyntax/feature_gate.rs
parentbeff387601fef141e7b6716a6cd50728d079a0c1 (diff)
parenta3818685e412435d6faecfcf9b016b4eb7627e90 (diff)
downloadrust-a2b27c19dad8b90063b56eff7b6433ba3f390d96.tar.gz
rust-a2b27c19dad8b90063b56eff7b6433ba3f390d96.zip
Auto merge of #54497 - ralexstokes:stabilize_pattern_parentheses, r=nikomatsakis
Stabilize pattern_parentheses feature

Addresses #51087 .

Stabilizes the previously unstable feature `pattern_parentheses` which enables the use of `()` in match patterns.
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
-rw-r--r--src/libsyntax/feature_gate.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 2faa38fd9f8..bbadfa01221 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -415,9 +415,6 @@ declare_features! (
     // Multiple patterns with `|` in `if let` and `while let`
     (active, if_while_or_patterns, "1.26.0", Some(48215), None),
 
-    // Parentheses in patterns
-    (active, pattern_parentheses, "1.26.0", Some(51087), None),
-
     // Allows `#[repr(packed)]` attribute on structs
     (active, repr_packed, "1.26.0", Some(33158), None),
 
@@ -686,6 +683,8 @@ declare_features! (
     (accepted, extern_absolute_paths, "1.30.0", Some(44660), None),
     // Access to crate names passed via `--extern` through prelude
     (accepted, extern_prelude, "1.30.0", Some(44660), None),
+    // Parentheses in patterns
+    (accepted, pattern_parentheses, "1.31.0", Some(51087), None),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1791,10 +1790,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 gate_feature_post!(&self, exclusive_range_pattern, pattern.span,
                                    "exclusive range pattern syntax is experimental");
             }
-            PatKind::Paren(..) => {
-                gate_feature_post!(&self, pattern_parentheses, pattern.span,
-                                   "parentheses in patterns are unstable");
-            }
             _ => {}
         }
         visit::walk_pat(self, pattern)