(pat, ..,) is now syntactically legal.

This commit is contained in:
Mazdak Farrokhzad 2019-07-08 03:03:12 +02:00
parent 06e5ae5c82
commit e3cdadd73f
2 changed files with 2 additions and 9 deletions

View file

@ -1,6 +1,7 @@
// check-pass
fn main() {
match (0, 1, 2) {
(pat, ..,) => {}
//~^ ERROR trailing comma is not permitted after `..`
}
}

View file

@ -1,8 +0,0 @@
error: trailing comma is not permitted after `..`
--> $DIR/pat-tuple-2.rs:3:17
|
LL | (pat, ..,) => {}
| ^ trailing comma is not permitted after `..`
error: aborting due to previous error