about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-24 15:27:06 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-03-01 01:47:56 +0300
commitc9aff92e6dc3ea43228d3d4e24ee7f5485943569 (patch)
tree84fe8eb3d8ea997a2fecd31c818ce040a3f741af /src/test/parse-fail
parent0ff9872b2280009f094af0df3dcdc542cc46a5fd (diff)
downloadrust-c9aff92e6dc3ea43228d3d4e24ee7f5485943569.tar.gz
rust-c9aff92e6dc3ea43228d3d4e24ee7f5485943569.zip
Support parentheses in patterns under feature gate
Improve recovery for trailing comma after `..`
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/pat-tuple-2.rs2
-rw-r--r--src/test/parse-fail/pat-tuple-6.rs17
2 files changed, 1 insertions, 18 deletions
diff --git a/src/test/parse-fail/pat-tuple-2.rs b/src/test/parse-fail/pat-tuple-2.rs
index ad52fa57870..07b391d3279 100644
--- a/src/test/parse-fail/pat-tuple-2.rs
+++ b/src/test/parse-fail/pat-tuple-2.rs
@@ -12,6 +12,6 @@
 
 fn main() {
     match 0 {
-        (pat, ..,) => {} //~ ERROR expected pattern, found `)`
+        (pat, ..,) => {} //~ ERROR trailing comma is not permitted after `..`
     }
 }
diff --git a/src/test/parse-fail/pat-tuple-6.rs b/src/test/parse-fail/pat-tuple-6.rs
deleted file mode 100644
index 3252d92fe1b..00000000000
--- a/src/test/parse-fail/pat-tuple-6.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (pat) => {} //~ ERROR expected one of `,` or `@`, found `)`
-    }
-}