Skip to content

Commit 332db94

Browse files
committed
---
yaml --- r: 20795 b: refs/heads/snap-stage3 c: fd536d9 h: refs/heads/master i: 20793: 10da85d 20791: 9778e13 v: v3
1 parent 9d95b27 commit 332db94

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,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4991cc5d19a61da91345e9a324c0ea4b8d1b923d
4+
refs/heads/snap-stage3: fd536d9d3e5a54b0a7b551a795198210fc229da3
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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)