diff --git a/src/libcore/future.rs b/src/libcore/future.rs
index d7773d93497..7bd73207ef5 100644
--- a/src/libcore/future.rs
+++ b/src/libcore/future.rs
@@ -65,7 +65,7 @@ fn from_value(+val: A) -> Future {
}
macro_rules! move_it (
- {$x:expr} => { unsafe { let y <- *ptr::addr_of($x); y } }
+ ($x:expr) => { unsafe { let y <- *ptr::addr_of($x); y } }
)
fn from_port(+port: future_pipe::client::waiting) -> Future {
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 4752b2d3a56..16b4e681051 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -1033,7 +1033,7 @@ fn kill_taskgroup(state: TaskGroupInner, me: *rust_task, is_main: bool) {
// a proper closure because the #[test]s won't understand. Have to fake it.
macro_rules! taskgroup_key (
// Use a "code pointer" value that will never be a real code pointer.
- {} => (unsafe::transmute((-2 as uint, 0u)))
+ () => (unsafe::transmute((-2 as uint, 0u)))
)
fn gen_child_taskgroup(linked: bool, supervised: bool)
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 2aef7c99dbc..5454d9ac0d9 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -127,7 +127,7 @@ enum view_item_parse_mode {
The important thing is to make sure that lookahead doesn't balk
at INTERPOLATED tokens */
macro_rules! maybe_whole_expr (
- {$p:expr} => { match copy $p.token {
+ ($p:expr) => { match copy $p.token {
INTERPOLATED(token::nt_expr(e)) => {
$p.bump();
return pexpr(e);
@@ -142,26 +142,26 @@ macro_rules! maybe_whole_expr (
)
macro_rules! maybe_whole (
- {$p:expr, $constructor:ident} => { match copy $p.token {
+ ($p:expr, $constructor:ident) => { match copy $p.token {
INTERPOLATED(token::$constructor(x)) => { $p.bump(); return x; }
_ => ()
}} ;
- {deref $p:expr, $constructor:ident} => { match copy $p.token {
+ (deref $p:expr, $constructor:ident) => { match copy $p.token {
INTERPOLATED(token::$constructor(x)) => { $p.bump(); return *x; }
_ => ()
}} ;
- {some $p:expr, $constructor:ident} => { match copy $p.token {
+ (some $p:expr, $constructor:ident) => { match copy $p.token {
INTERPOLATED(token::$constructor(x)) => { $p.bump(); return some(x); }
_ => ()
}} ;
- {iovi $p:expr, $constructor:ident} => { match copy $p.token {
+ (iovi $p:expr, $constructor:ident) => { match copy $p.token {
INTERPOLATED(token::$constructor(x)) => {
$p.bump();
return iovi_item(x);
}
_ => ()
}} ;
- {pair_empty $p:expr, $constructor:ident} => { match copy $p.token {
+ (pair_empty $p:expr, $constructor:ident) => { match copy $p.token {
INTERPOLATED(token::$constructor(x)) => { $p.bump(); return (~[], x); }
_ => ()
}}
diff --git a/src/test/run-pass/html-literals.rs b/src/test/run-pass/html-literals.rs
index 80f283c4f2b..dc8abc53297 100644
--- a/src/test/run-pass/html-literals.rs
+++ b/src/test/run-pass/html-literals.rs
@@ -16,18 +16,18 @@ left.
*/
macro_rules! html (
- { $($body:tt)* } => (
+ ( $($body:tt)* ) => (
parse_node!( []; []; $($body)* )
)
)
macro_rules! parse_node (
- {
+ (
[:$head:ident ($(:$head_nodes:expr),*)
$(:$tags:ident ($(:$tag_nodes:expr),*))*];
[$(:$nodes:expr),*];
$tag:ident> $($rest:tt)*
- } => (
+ ) => (
parse_node!(
[$(: $tags ($(:$tag_nodes),*))*];
[$(:$head_nodes,)* :tag(stringify!($head), ~[$($nodes),*])];
@@ -35,11 +35,11 @@ macro_rules! parse_node (
)
);
- {
+ (
[$(:$tags:ident ($(:$tag_nodes:expr),*) )*];
[$(:$nodes:expr),*];
<$tag:ident> $($rest:tt)*
- } => (
+ ) => (
parse_node!(
[:$tag ($(:$nodes)*) $(: $tags ($(:$tag_nodes),*) )*];
[];
@@ -47,11 +47,11 @@ macro_rules! parse_node (
)
);
- {
+ (
[$(:$tags:ident ($(:$tag_nodes:expr),*) )*];
[$(:$nodes:expr),*];
. $($rest:tt)*
- } => (
+ ) => (
parse_node!(
[$(: $tags ($(:$tag_nodes),*))*];
[$(:$nodes,)* :text(~".")];
@@ -59,11 +59,11 @@ macro_rules! parse_node (
)
);
- {
+ (
[$(:$tags:ident ($(:$tag_nodes:expr),*) )*];
[$(:$nodes:expr),*];
$word:ident $($rest:tt)*
- } => (
+ ) => (
parse_node!(
[$(: $tags ($(:$tag_nodes),*))*];
[$(:$nodes,)* :text(stringify!($word))];
@@ -71,7 +71,7 @@ macro_rules! parse_node (
)
);
- { []; [:$e:expr]; } => ( $e );
+ ( []; [:$e:expr]; ) => ( $e );
)
fn main() {
diff --git a/src/test/run-pass/macro-2.rs b/src/test/run-pass/macro-2.rs
index 69a7e557fdc..31f6d60df23 100644
--- a/src/test/run-pass/macro-2.rs
+++ b/src/test/run-pass/macro-2.rs
@@ -10,7 +10,7 @@ fn main() {
assert (mylambda!(y, y * 2)(8) == 16);
macro_rules! mylambda_tt(
- {$x:ident, $body:expr} => {
+ ($x:ident, $body:expr) => {
fn f($x: int) -> int { return $body; };
f
}
diff --git a/src/test/run-pass/macro-3.rs b/src/test/run-pass/macro-3.rs
index 549d7d1aaf0..6148ab96979 100644
--- a/src/test/run-pass/macro-3.rs
+++ b/src/test/run-pass/macro-3.rs
@@ -6,7 +6,7 @@ fn main() {
assert (trivial!() == 16);
macro_rules! trivial_tt(
- {} => {1*2*4*2*1}
+ () => {1*2*4*2*1}
)
assert(trivial_tt!() == 16);
}
diff --git a/src/test/run-pass/macro-by-example-1.rs b/src/test/run-pass/macro-by-example-1.rs
index 65b3fe0ac59..1ea77b97b8e 100644
--- a/src/test/run-pass/macro-by-example-1.rs
+++ b/src/test/run-pass/macro-by-example-1.rs
@@ -3,7 +3,7 @@ fn main() {
#macro[[#apply[f, [x, ...]], f(x, ...)]];
macro_rules! apply_tt(
- {$f:expr, ($($x:expr),*)} => {$f($($x),*)}
+ ($f:expr, ($($x:expr),*)) => {$f($($x),*)}
)
fn add(a: int, b: int) -> int { return a + b; }
diff --git a/src/test/run-pass/macro-interpolation.rs b/src/test/run-pass/macro-interpolation.rs
index 38032e4ec52..627500249d9 100644
--- a/src/test/run-pass/macro-interpolation.rs
+++ b/src/test/run-pass/macro-interpolation.rs
@@ -1,6 +1,6 @@
macro_rules! overly_complicated (
- {$fnname:ident, $arg:ident, $ty:ty, $body:block, $val:expr, $pat:pat, $res:path} =>
+ ($fnname:ident, $arg:ident, $ty:ty, $body:block, $val:expr, $pat:pat, $res:path) =>
{
fn $fnname($arg: $ty) -> option<$ty> $body
match $fnname($val) {
diff --git a/src/test/run-pass/macro.rs b/src/test/run-pass/macro.rs
index 30622d59886..42bc26797d1 100644
--- a/src/test/run-pass/macro.rs
+++ b/src/test/run-pass/macro.rs
@@ -5,7 +5,7 @@ fn main() {
assert (m1!(2) == 8);
macro_rules! m1tt (
- {$a:expr} => {$a*4}
+ ($a:expr) => {$a*4}
);
assert(m1tt!(2) == 8);
}