Skip to content

Commit c03ce8b

Browse files
committed
---
yaml --- r: 56508 b: refs/heads/auto c: aa34640 h: refs/heads/master v: v3
1 parent c12eb3b commit c03ce8b

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d2aee7b3e68c33edc410485f7ccadba1484c3bc3
17+
refs/heads/auto: aa346401baae03aeeba5d3ff10006eae7b60ca0e
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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)