From c9aff92e6dc3ea43228d3d4e24ee7f5485943569 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 24 Feb 2018 15:27:06 +0300 Subject: Support parentheses in patterns under feature gate Improve recovery for trailing comma after `..` --- src/test/parse-fail/pat-tuple-2.rs | 2 +- src/test/parse-fail/pat-tuple-6.rs | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 src/test/parse-fail/pat-tuple-6.rs (limited to 'src/test/parse-fail') 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 or the MIT license -// , 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 `)` - } -} -- cgit 1.4.1-3-g733a5