diff options
| author | Paul Stansifer <paul.stansifer@gmail.com> | 2012-07-26 10:14:01 -0700 |
|---|---|---|
| committer | Paul Stansifer <paul.stansifer@gmail.com> | 2012-07-26 10:14:01 -0700 |
| commit | f4c093c4af22358c85a3f1b72a878714f8ca588c (patch) | |
| tree | 2642ae6af12864f1903f176227c677f6462af2b5 /src/libcore | |
| parent | 7f5fbd4f9d2f9f60240d80a103d00595328042cd (diff) | |
| download | rust-f4c093c4af22358c85a3f1b72a878714f8ca588c.tar.gz rust-f4c093c4af22358c85a3f1b72a878714f8ca588c.zip | |
Change `#macro` to `macro_rules!` in some cases.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/future.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libcore/future.rs b/src/libcore/future.rs index f7efe70b5dc..86837285c2b 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -60,11 +60,8 @@ fn from_value<A>(+val: A) -> future<A> { }) } -fn macros() { - #macro[ - [#move[x], - unsafe { let y <- *ptr::addr_of(x); y }] - ]; +macro_rules! move{ + {$x:expr} => { unsafe { let y <- *ptr::addr_of($x); y } } } fn from_port<A:send>(-port: future_pipe::client::waiting<A>) -> future<A> { @@ -81,7 +78,7 @@ fn from_port<A:send>(-port: future_pipe::client::waiting<A>) -> future<A> { port_ <-> *port; let port = option::unwrap(port_); alt recv(port) { - future_pipe::completed(data) { #move(data) } + future_pipe::completed(data) { move!{data} } } } } |
