diff options
| author | bors <bors@rust-lang.org> | 2018-09-26 07:38:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-26 07:38:19 +0000 |
| commit | a2b27c19dad8b90063b56eff7b6433ba3f390d96 (patch) | |
| tree | e5c2b57922beb88af06a57fff1a4114d5e3443ba /src/test | |
| parent | beff387601fef141e7b6716a6cd50728d079a0c1 (diff) | |
| parent | a3818685e412435d6faecfcf9b016b4eb7627e90 (diff) | |
| download | rust-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/test')
5 files changed, 2 insertions, 31 deletions
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; |
