about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-05-29 19:59:33 -0400
committerNiko Matsakis <niko@alum.mit.edu>2013-05-30 15:20:36 -0400
commit7a1a40890d48321c69f66bd07e3a23d5d5ab939a (patch)
tree54eb8701f89acc95b05a2de5cfcd5c9be2742a3d /src/libsyntax/ext/tt
parent5209709e46ecfac2fd4db527952fe7ef96400801 (diff)
downloadrust-7a1a40890d48321c69f66bd07e3a23d5d5ab939a.tar.gz
rust-7a1a40890d48321c69f66bd07e3a23d5d5ab939a.zip
Remove copy bindings from patterns.
Diffstat (limited to 'src/libsyntax/ext/tt')
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs2
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index 183bc2a77c5..ec63b5a7f74 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -423,7 +423,7 @@ pub fn parse_nt(p: &Parser, name: &str) -> nonterminal {
       },
       "block" => token::nt_block(p.parse_block()),
       "stmt" => token::nt_stmt(p.parse_stmt(~[])),
-      "pat" => token::nt_pat(p.parse_pat(true)),
+      "pat" => token::nt_pat(p.parse_pat()),
       "expr" => token::nt_expr(p.parse_expr()),
       "ty" => token::nt_ty(p.parse_ty(false /* no need to disambiguate*/)),
       // this could be handled like a token, since it is one
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index cac963727e3..4a6a070df50 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -207,8 +207,8 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
         } else { /* repeat */
             r.stack.idx = 0u;
             r.repeat_idx[r.repeat_idx.len() - 1u] += 1u;
-            match r.stack.sep {
-              Some(copy tk) => {
+            match copy r.stack.sep {
+              Some(tk) => {
                 r.cur_tok = tk; /* repeat same span, I guess */
                 return ret_val;
               }
@@ -218,8 +218,8 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
     }
     loop { /* because it's easiest, this handles `tt_delim` not starting
     with a `tt_tok`, even though it won't happen */
-        match r.stack.forest[r.stack.idx] {
-          tt_delim(copy tts) => {
+        match copy r.stack.forest[r.stack.idx] {
+          tt_delim(tts) => {
             r.stack = @mut TtFrame {
                 forest: @mut tts,
                 idx: 0u,
@@ -229,13 +229,13 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
             };
             // if this could be 0-length, we'd need to potentially recur here
           }
-          tt_tok(sp, copy tok) => {
+          tt_tok(sp, tok) => {
             r.cur_span = sp;
             r.cur_tok = tok;
             r.stack.idx += 1u;
             return ret_val;
           }
-          tt_seq(sp, copy tts, copy sep, zerok) => {
+          tt_seq(sp, tts, sep, zerok) => {
             let t = tt_seq(sp, copy tts, copy sep, zerok);
             match lockstep_iter_size(&t, r) {
               lis_unconstrained => {