File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2021,7 +2021,7 @@ impl Parser {
2021
2021
let es = self . parse_unspanned_seq (
2022
2022
& token:: LPAREN ,
2023
2023
& token:: RPAREN ,
2024
- seq_sep_trailing_disallowed ( token:: COMMA ) ,
2024
+ seq_sep_trailing_allowed ( token:: COMMA ) ,
2025
2025
|p| p. parse_expr ( )
2026
2026
) ;
2027
2027
hi = self . last_span . hi ;
@@ -2994,6 +2994,7 @@ impl Parser {
2994
2994
if self . look_ahead ( 1 , |t| * t != token:: RPAREN ) {
2995
2995
while self . token == token:: COMMA {
2996
2996
self . bump ( ) ;
2997
+ if self . token == token:: RPAREN { break ; }
2997
2998
fields. push ( self . parse_pat ( ) ) ;
2998
2999
}
2999
3000
}
@@ -3573,7 +3574,7 @@ impl Parser {
3573
3574
self . parse_unspanned_seq (
3574
3575
& token:: LPAREN ,
3575
3576
& token:: RPAREN ,
3576
- seq_sep_trailing_disallowed ( token:: COMMA ) ,
3577
+ seq_sep_trailing_allowed ( token:: COMMA ) ,
3577
3578
|p| {
3578
3579
if p. token == token:: DOTDOTDOT {
3579
3580
p. bump ( ) ;
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments