about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-01 03:16:32 -0700
committerbors <bors@rust-lang.org>2013-10-01 03:16:32 -0700
commitec2b9cc22826fcc109e9a01b0c9d6e64983bea0d (patch)
treec0f77f1c99f65d88af47e9f976727dbd92d1c899
parentd6c3b67348d9d6860051a04ee24e284414fa49a6 (diff)
parent6f166894ba4b5c4141212bc9f88361b6454c4b65 (diff)
downloadrust-ec2b9cc22826fcc109e9a01b0c9d6e64983bea0d.tar.gz
rust-ec2b9cc22826fcc109e9a01b0c9d6e64983bea0d.zip
auto merge of #9657 : huonw/rust/oldfmt, r=huonw
This meant the "smooth" migration path @alexcrichton had planned was broken, since any use of the old `fmt!` met with an undefined macro error (and the logging was using the new syntax, accidentally).
-rw-r--r--src/libsyntax/ext/expand.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index e8307bf5786..5118184bf00 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -813,7 +813,7 @@ pub fn std_macros() -> @str {
     mod fmt_extension {
         #[macro_escape];
 
-        macro_rules! fmt(($($arg:tt)*) => (oldformat!($($arg)*)))
+        macro_rules! fmt(($($arg:tt)*) => (oldfmt!($($arg)*)))
 
         macro_rules! log(
             ($lvl:expr, $arg:expr) => ({
@@ -821,7 +821,7 @@ pub fn std_macros() -> @str {
                 if lvl <= __log_level() {
                     format_args!(|args| {
                         ::std::logging::log(lvl, args)
-                    }, \"{}\", format!(\"{:?}\", $arg))
+                    }, \"{}\", fmt!(\"{:?}\", $arg))
                 }
             });
             ($lvl:expr, $($arg:expr),+) => ({
@@ -829,7 +829,7 @@ pub fn std_macros() -> @str {
                 if lvl <= __log_level() {
                     format_args!(|args| {
                         ::std::logging::log(lvl, args)
-                    }, \"{}\", format!($($arg),+))
+                    }, \"{}\", fmt!($($arg),+))
                 }
             })
         )
@@ -848,7 +848,7 @@ pub fn std_macros() -> @str {
                 ::std::sys::FailWithCause::fail_with($msg, file!(), line!())
             );
             ($( $arg:expr ),+) => (
-                ::std::sys::FailWithCause::fail_with(format!( $($arg),+ ), file!(), line!())
+                ::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
             )
         )
     }