about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/feature_gate.rs9
-rw-r--r--src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-pattern_parentheses.rs15
-rw-r--r--src/test/ui/feature-gates/feature-gate-pattern_parentheses.stderr11
-rw-r--r--src/test/ui/run-pass/binding/pat-tuple-7.rs1
-rw-r--r--src/test/ui/run-pass/binding/range-inclusive-pattern-precedence.rs2
6 files changed, 4 insertions, 38 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d44d2146d82..1befc8e3ee0 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -412,9 +412,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),
 
@@ -680,6 +677,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
@@ -1773,10 +1772,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)
diff --git a/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs b/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
index 6ae06f2d561..8f54f2e2dc3 100644
--- a/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
+++ b/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
@@ -284,9 +284,7 @@ fn run() {
     reject_stmt_parse("#[attr] #![attr] foo!{}");
 
     // FIXME: Allow attributes in pattern constexprs?
-    // would require parens in patterns to allow disambiguation...
-    // —which is now available under the `pattern_parentheses` feature gate
-    // (tracking issue #51087)
+    // note: requires parens in patterns to allow disambiguation
 
     reject_expr_parse("match 0 {
         0..=#[attr] 10 => ()
diff --git a/src/test/ui/feature-gates/feature-gate-pattern_parentheses.rs b/src/test/ui/feature-gates/feature-gate-pattern_parentheses.rs
deleted file mode 100644
index 29768018f0e..00000000000
--- a/src/test/ui/feature-gates/feature-gate-pattern_parentheses.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match 0 {
-        (pat) => {} //~ ERROR parentheses in patterns are unstable
-    }
-}
diff --git a/src/test/ui/feature-gates/feature-gate-pattern_parentheses.stderr b/src/test/ui/feature-gates/feature-gate-pattern_parentheses.stderr
deleted file mode 100644
index 4268d27ebec..00000000000
--- a/src/test/ui/feature-gates/feature-gate-pattern_parentheses.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0658]: parentheses in patterns are unstable (see issue #51087)
-  --> $DIR/feature-gate-pattern_parentheses.rs:13:9
-   |
-LL |         (pat) => {} //~ ERROR parentheses in patterns are unstable
-   |         ^^^^^
-   |
-   = help: add #![feature(pattern_parentheses)] to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/run-pass/binding/pat-tuple-7.rs b/src/test/ui/run-pass/binding/pat-tuple-7.rs
index c6730f14bc4..c32b52eac33 100644
--- a/src/test/ui/run-pass/binding/pat-tuple-7.rs
+++ b/src/test/ui/run-pass/binding/pat-tuple-7.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 // run-pass
-#![feature(pattern_parentheses)]
 
 fn main() {
     match 0 {
diff --git a/src/test/ui/run-pass/binding/range-inclusive-pattern-precedence.rs b/src/test/ui/run-pass/binding/range-inclusive-pattern-precedence.rs
index 350a64781cd..d492edb1617 100644
--- a/src/test/ui/run-pass/binding/range-inclusive-pattern-precedence.rs
+++ b/src/test/ui/run-pass/binding/range-inclusive-pattern-precedence.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // run-pass
-#![feature(box_patterns, pattern_parentheses)]
+#![feature(box_patterns)]
 
 const VALUE: usize = 21;