From 82198c9925a8f5da2a8218dc875bc802e7db6049 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 31 Jul 2012 19:27:23 -0700 Subject: [PATCH] test: Fix broken test that used "move" as an identifier --- src/test/run-pass/pipe-bank-proto.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/run-pass/pipe-bank-proto.rs b/src/test/run-pass/pipe-bank-proto.rs index d811eaacbe1c..af50c9c974e7 100644 --- a/src/test/run-pass/pipe-bank-proto.rs +++ b/src/test/run-pass/pipe-bank-proto.rs @@ -32,7 +32,7 @@ proto! bank { } } -macro_rules! move { +macro_rules! move_it { { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } } } @@ -41,15 +41,15 @@ fn switch(+endp: pipes::recv_packet, f(pipes::try_recv(endp)) } -fn move(-x: T) -> T { x } +fn move_it(-x: T) -> T { x } macro_rules! follow { { $($message:path($($x: ident),+) => $next:ident $e:expr)+ } => ( - |m| alt move(m) { + |m| alt move_it(m) { $(some($message($($x,)* next)) { - let $next = move!{next}; + let $next = move_it!{next}; $e })+ _ { fail } } @@ -58,9 +58,9 @@ macro_rules! follow { { $($message:path => $next:ident $e:expr)+ } => ( - |m| alt move(m) { + |m| alt move_it(m) { $(some($message(next)) { - let $next = move!{next}; + let $next = move_it!{next}; $e })+ _ { fail } } @@ -111,7 +111,7 @@ fn bank_client(+bank: bank::client::login) { let bank = client::login(bank, ~"theincredibleholk", ~"1234"); let bank = alt try_recv(bank) { some(ok(connected)) { - move!{connected} + move_it!{connected} } some(invalid(_)) { fail ~"login unsuccessful" } none { fail ~"bank closed the connection" } @@ -133,4 +133,4 @@ fn bank_client(+bank: bank::client::login) { } fn main() { -} \ No newline at end of file +}