File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -1693,7 +1693,7 @@ class parser {
1693
1693
}
1694
1694
}
1695
1695
tok {
1696
- if ( !is_ident ( tok) && tok != token :: BINOP ( token :: PLUS ) ) ||
1696
+ if !is_ident( tok) ||
1697
1697
self . is_keyword ( ~"true ") || self . is_keyword ( ~"false ") {
1698
1698
let val = self . parse_expr_res ( RESTRICT_NO_BAR_OP ) ;
1699
1699
if self . eat_keyword ( ~"to") {
@@ -1708,22 +1708,14 @@ class parser {
1708
1708
let binding_mode;
1709
1709
if self . eat_keyword ( ~"ref ") {
1710
1710
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;
1711
1717
} 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;
1727
1719
}
1728
1720
1729
1721
if is_plain_ident ( self . token ) &&
You can’t perform that action at this time.
0 commit comments