Skip to content

Commit 9b86561

Browse files
committed
---
yaml --- r: 55102 b: refs/heads/snap-stage3 c: aa34640 h: refs/heads/master v: v3
1 parent 574e891 commit 9b86561

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d2aee7b3e68c33edc410485f7ccadba1484c3bc3
4+
refs/heads/snap-stage3: aa346401baae03aeeba5d3ff10006eae7b60ca0e
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,11 +1123,12 @@ pub impl Parser {
11231123
}
11241124
}
11251125

1126-
fn parse_field(&self, sep: token::Token) -> field {
1126+
// parse ident COLON expr
1127+
fn parse_field(&self) -> field {
11271128
let lo = self.span.lo;
11281129
let m = self.parse_mutability();
11291130
let i = self.parse_ident();
1130-
self.expect(&sep);
1131+
self.expect(&token::COLON);
11311132
let e = self.parse_expr();
11321133
spanned(lo, e.span.hi, ast::field_ { mutbl: m, ident: i, expr: e })
11331134
}
@@ -1323,7 +1324,7 @@ pub impl Parser {
13231324
let mut fields = ~[];
13241325
let mut base = None;
13251326

1326-
fields.push(self.parse_field(token::COLON));
1327+
fields.push(self.parse_field());
13271328
while *self.token != token::RBRACE {
13281329
if self.try_parse_obsolete_with() {
13291330
break;
@@ -1340,7 +1341,7 @@ pub impl Parser {
13401341
// Accept an optional trailing comma.
13411342
break;
13421343
}
1343-
fields.push(self.parse_field(token::COLON));
1344+
fields.push(self.parse_field());
13441345
}
13451346

13461347
hi = pth.span.hi;

0 commit comments

Comments
 (0)