Skip to content

Commit 1aa6f9a

Browse files
committed
---
yaml --- r: 107582 b: refs/heads/dist-snap c: aedf567 h: refs/heads/master v: v3
1 parent 8281bad commit 1aa6f9a

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 2eb4f05850e25863f05a56b60931e9eb03944b56
9+
refs/heads/dist-snap: aedf567a950a22acd183da6b1dd7a7fef92e8351
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ impl Parser {
20212021
let es = self.parse_unspanned_seq(
20222022
&token::LPAREN,
20232023
&token::RPAREN,
2024-
seq_sep_trailing_disallowed(token::COMMA),
2024+
seq_sep_trailing_allowed(token::COMMA),
20252025
|p| p.parse_expr()
20262026
);
20272027
hi = self.last_span.hi;
@@ -2994,6 +2994,7 @@ impl Parser {
29942994
if self.look_ahead(1, |t| *t != token::RPAREN) {
29952995
while self.token == token::COMMA {
29962996
self.bump();
2997+
if self.token == token::RPAREN { break; }
29972998
fields.push(self.parse_pat());
29982999
}
29993000
}
@@ -3573,7 +3574,7 @@ impl Parser {
35733574
self.parse_unspanned_seq(
35743575
&token::LPAREN,
35753576
&token::RPAREN,
3576-
seq_sep_trailing_disallowed(token::COMMA),
3577+
seq_sep_trailing_allowed(token::COMMA),
35773578
|p| {
35783579
if p.token == token::DOTDOTDOT {
35793580
p.bump();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn f(_: int,) {}
12+
13+
pub fn main() {
14+
f(0,);
15+
let (_, _,) = (1, 1,);
16+
}

0 commit comments

Comments
 (0)