Skip to content

Commit 85d1005

Browse files
committed
---
yaml --- r: 106101 b: refs/heads/auto c: 4224147 h: refs/heads/master i: 106099: c3fa9ab v: v3
1 parent fadec17 commit 85d1005

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: cdab8a76f40969556ee1b86b8f107ec38cc137f9
16+
refs/heads/auto: 4224147bab87a191cfc935e2e763889c11e63111
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,6 @@ impl<'a> Parser<'a> {
27812781
break;
27822782
}
27832783

2784-
let lo1 = self.last_span.lo;
27852784
let bind_type = if self.eat_keyword(keywords::Mut) {
27862785
BindByValue(MutMutable)
27872786
} else if self.eat_keyword(keywords::Ref) {
@@ -2791,11 +2790,8 @@ impl<'a> Parser<'a> {
27912790
};
27922791

27932792
let fieldname = self.parse_ident();
2794-
let hi1 = self.last_span.lo;
2795-
let fieldpath = ast_util::ident_to_path(mk_sp(lo1, hi1),
2796-
fieldname);
2797-
let subpat;
2798-
if self.token == token::COLON {
2793+
2794+
let subpat = if self.token == token::COLON {
27992795
match bind_type {
28002796
BindByRef(..) | BindByValue(MutMutable) => {
28012797
let token_str = self.this_token_to_str();
@@ -2805,14 +2801,16 @@ impl<'a> Parser<'a> {
28052801
}
28062802

28072803
self.bump();
2808-
subpat = self.parse_pat();
2804+
self.parse_pat()
28092805
} else {
2810-
subpat = @ast::Pat {
2806+
let fieldpath = ast_util::ident_to_path(self.last_span,
2807+
fieldname);
2808+
@ast::Pat {
28112809
id: ast::DUMMY_NODE_ID,
28122810
node: PatIdent(bind_type, fieldpath, None),
28132811
span: self.last_span
2814-
};
2815-
}
2812+
}
2813+
};
28162814
fields.push(ast::FieldPat { ident: fieldname, pat: subpat });
28172815
}
28182816
return (fields, etc);

0 commit comments

Comments
 (0)