Skip to content

Commit ec2b9cc

Browse files
committed
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).
2 parents d6c3b67 + 6f16689 commit ec2b9cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,23 +813,23 @@ pub fn std_macros() -> @str {
813813
mod fmt_extension {
814814
#[macro_escape];
815815

816-
macro_rules! fmt(($($arg:tt)*) => (oldformat!($($arg)*)))
816+
macro_rules! fmt(($($arg:tt)*) => (oldfmt!($($arg)*)))
817817

818818
macro_rules! log(
819819
($lvl:expr, $arg:expr) => ({
820820
let lvl = $lvl;
821821
if lvl <= __log_level() {
822822
format_args!(|args| {
823823
::std::logging::log(lvl, args)
824-
}, \"{}\", format!(\"{:?}\", $arg))
824+
}, \"{}\", fmt!(\"{:?}\", $arg))
825825
}
826826
});
827827
($lvl:expr, $($arg:expr),+) => ({
828828
let lvl = $lvl;
829829
if lvl <= __log_level() {
830830
format_args!(|args| {
831831
::std::logging::log(lvl, args)
832-
}, \"{}\", format!($($arg),+))
832+
}, \"{}\", fmt!($($arg),+))
833833
}
834834
})
835835
)
@@ -848,7 +848,7 @@ pub fn std_macros() -> @str {
848848
::std::sys::FailWithCause::fail_with($msg, file!(), line!())
849849
);
850850
($( $arg:expr ),+) => (
851-
::std::sys::FailWithCause::fail_with(format!( $($arg),+ ), file!(), line!())
851+
::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
852852
)
853853
)
854854
}

0 commit comments

Comments
 (0)