Skip to content

Commit 1953b99

Browse files
committed
---
yaml --- r: 22903 b: refs/heads/master c: fd536d9 h: refs/heads/master i: 22901: 8c3aa79 22899: bcd3f66 22895: 932e796 v: v3
1 parent 94c4118 commit 1953b99

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4991cc5d19a61da91345e9a324c0ea4b8d1b923d
2+
refs/heads/master: fd536d9d3e5a54b0a7b551a795198210fc229da3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libsyntax/parse/parser.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ class parser {
16931693
}
16941694
}
16951695
tok {
1696-
if (!is_ident(tok) && tok != token::BINOP(token::PLUS)) ||
1696+
if !is_ident(tok) ||
16971697
self.is_keyword(~"true") || self.is_keyword(~"false") {
16981698
let val = self.parse_expr_res(RESTRICT_NO_BAR_OP);
16991699
if self.eat_keyword(~"to") {
@@ -1708,22 +1708,14 @@ class parser {
17081708
let binding_mode;
17091709
if self.eat_keyword(~"ref") {
17101710
binding_mode = bind_by_ref;
1711+
} else if self.eat_keyword(~"copy") {
1712+
binding_mode = bind_by_value;
1713+
} else if refutable {
1714+
// XXX: Should be bind_by_value, but that's not
1715+
// backward compatible.
1716+
binding_mode = bind_by_ref;
17111717
} else {
1712-
alt self.token {
1713-
token::BINOP(token::PLUS) => {
1714-
// XXX: Temporary thing pending a snapshot.
1715-
self.bump();
1716-
binding_mode = bind_by_value;
1717-
}
1718-
_ if refutable => {
1719-
// XXX: Should be bind_by_value, but that's not
1720-
// backward compatible.
1721-
binding_mode = bind_by_ref;
1722-
}
1723-
_ => {
1724-
binding_mode = bind_by_value;
1725-
}
1726-
}
1718+
binding_mode = bind_by_value;
17271719
}
17281720

17291721
if is_plain_ident(self.token) &&

0 commit comments

Comments
 (0)