Skip to content

Commit 2207696

Browse files
committed
---
yaml --- r: 10442 b: refs/heads/snap-stage3 c: 8a730a2 h: refs/heads/master v: v3
1 parent d0338f2 commit 2207696

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: bffb7db8aec094f6adbf7c68a7c02e8b1332a704
4+
refs/heads/snap-stage3: 8a730a255ddce72a3d7f8437e78b4128ad30e8b3
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ class parser {
805805
self.bump();
806806
let mutbl = self.parse_mutability();
807807
let es = self.parse_seq_to_end(
808-
token::RBRACKET, seq_sep_trailing_disallowed(token::COMMA),
808+
token::RBRACKET, seq_sep_trailing_allowed(token::COMMA),
809809
{|p| p.parse_expr()});
810810
hi = self.span.hi;
811811
ex = expr_vec(es, mutbl);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
let v = [,]; //! ERROR unexpected token: ','
3+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Issue #2482.
2+
3+
fn main() {
4+
let v1: [int] = [10, 20, 30,];
5+
let v2: [int] = [10, 20, 30];
6+
assert (v1[2] == v2[2]);
7+
let v3: [int] = [10,];
8+
let v4: [int] = [10];
9+
assert (v3[0] == v4[0]);
10+
}

0 commit comments

Comments
 (0)