Skip to content

Commit bd4119f

Browse files
committed
Minor fallout/update FOLLOW sets
1 parent ac8e105 commit bd4119f

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/libcore/macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ macro_rules! write {
186186
#[macro_export]
187187
#[stable]
188188
macro_rules! writeln {
189-
($dst:expr, $fmt:expr, $($arg:tt)*) => (
190-
write!($dst, concat!($fmt, "\n") $($arg)*)
191-
);
192189
($dst:expr, $fmt:expr) => (
193190
write!($dst, concat!($fmt, "\n"))
194-
)
191+
);
192+
($dst:expr, $fmt:expr, $($arg:expr),*) => (
193+
write!($dst, concat!($fmt, "\n"), $($arg,)*)
194+
);
195195
}
196196

197197
/// A utility macro for indicating unreachable code.

src/libstd/rt/macros.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,24 @@
1414
//! they aren't defined anywhere outside of the `rt` module.
1515
1616
macro_rules! rterrln {
17-
($fmt:expr $($arg:tt)*) => ( {
18-
::rt::util::dumb_print(format_args!(concat!($fmt, "\n") $($arg)*))
17+
($fmt:expr) => ( {
18+
::rt::util::dumb_print(format_args!(concat!($fmt, "\n")))
19+
} );
20+
($fmt:expr, $($arg:expr),*) => ( {
21+
::rt::util::dumb_print(format_args!(concat!($fmt, "\n"), $($arg)*))
1922
} )
2023
}
2124

2225
// Some basic logging. Enabled by passing `--cfg rtdebug` to the libstd build.
2326
macro_rules! rtdebug {
24-
($($arg:tt)*) => ( {
27+
($arg:expr) => ( {
2528
if cfg!(rtdebug) {
26-
rterrln!($($arg)*)
29+
rterrln!($arg)
30+
}
31+
} );
32+
($str:expr, $($arg:expr),*) => ( {
33+
if cfg!(rtdebug) {
34+
rterrln!($str, $($arg)*)
2735
}
2836
})
2937
}

src/libsyntax/ext/tt/macro_rules.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn is_in_follow(cx: &ExtCtxt, tok: &Token, frag: &str) -> bool {
422422
},
423423
"stmt" | "expr" => {
424424
match *tok {
425-
Comma | Semi => true,
425+
FatArrow | Comma | Semi => true,
426426
_ => false
427427
}
428428
},
@@ -434,7 +434,7 @@ fn is_in_follow(cx: &ExtCtxt, tok: &Token, frag: &str) -> bool {
434434
},
435435
"path" | "ty" => {
436436
match *tok {
437-
Comma | RArrow | Colon | Eq | Gt => true,
437+
Comma | FatArrow | Colon | Eq | Gt => true,
438438
Ident(i, _) if i.as_str() == "as" => true,
439439
_ => false
440440
}

0 commit comments

Comments
 (0)