about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSimon BD <simon@server>2012-10-06 13:15:18 -0500
committerSimon BD <simon@server>2012-10-06 13:15:18 -0500
commit0e3bec0ced8d781cdd93996e7b8eeedb13f81ba8 (patch)
tree4738dcf131910061f5253ee5ef42960b9aef35f5 /src/libsyntax/parse/parser.rs
parentd4a54837d4ab28219727e1f1e0c131ba6033ba94 (diff)
parentf96a2a2ca16a44f869336f7e28fc261551c1184c (diff)
Merge remote-tracking branch 'original/incoming' into incoming
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 8860d1b5cea..22c25186c91 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -20,13 +20,13 @@ use obsolete::{
     ObsoleteLowerCaseKindBounds, ObsoleteLet,
     ObsoleteFieldTerminator, ObsoleteStructCtor,
     ObsoleteWith, ObsoleteClassMethod, ObsoleteClassTraits,
-    ObsoleteModeInFnType
+    ObsoleteModeInFnType, ObsoleteByMutRefMode
 };
 use ast::{_mod, add, alt_check, alt_exhaustive, arg, arm, attribute,
              bind_by_ref, bind_by_implicit_ref, bind_by_value, bind_by_move,
              bitand, bitor, bitxor, blk, blk_check_mode, bound_const,
              bound_copy, bound_send, bound_trait, bound_owned, box, by_copy,
-             by_move, by_mutbl_ref, by_ref, by_val, capture_clause,
+             by_move, by_ref, by_val, capture_clause,
              capture_item, cdir_dir_mod, cdir_src_mod, cdir_view_item,
              class_immutable, class_mutable,
              crate, crate_cfg, crate_directive, decl, decl_item, decl_local,
@@ -570,7 +570,10 @@ impl parser {
 
     fn parse_arg_mode() -> mode {
         if self.eat(token::BINOP(token::AND)) {
-            expl(by_mutbl_ref)
+            self.obsolete(copy self.span,
+                          ObsoleteByMutRefMode);
+            // Bogus mode, but doesn't matter since it's an error
+            expl(by_ref)
         } else if self.eat(token::BINOP(token::MINUS)) {
             expl(by_move)
         } else if self.eat(token::ANDAND) {
@@ -1275,7 +1278,8 @@ impl parser {
 
         return match self.token {
           token::LPAREN | token::LBRACE | token::LBRACKET => {
-            let ket = token::flip_delimiter(self.token);
+              // tjc: ??????
+            let ket = token::flip_delimiter(copy self.token);
             tt_delim(vec::append(
                 ~[parse_tt_tok(self, true)],
                 vec::append(
@@ -1296,7 +1300,8 @@ impl parser {
         return match self.token {
           token::LBRACE | token::LPAREN | token::LBRACKET => {
             self.parse_matcher_subseq(name_idx, copy self.token,
-                                      token::flip_delimiter(self.token))
+                                      // tjc: not sure why we need a copy
+                                      token::flip_delimiter(copy self.token))
           }
           _ => self.fatal(~"expected open delimiter")
         }