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).
This commit is contained in:
commit
ec2b9cc228
1 changed files with 4 additions and 4 deletions
|
@ -813,7 +813,7 @@ pub fn std_macros() -> @str {
|
||||||
mod fmt_extension {
|
mod fmt_extension {
|
||||||
#[macro_escape];
|
#[macro_escape];
|
||||||
|
|
||||||
macro_rules! fmt(($($arg:tt)*) => (oldformat!($($arg)*)))
|
macro_rules! fmt(($($arg:tt)*) => (oldfmt!($($arg)*)))
|
||||||
|
|
||||||
macro_rules! log(
|
macro_rules! log(
|
||||||
($lvl:expr, $arg:expr) => ({
|
($lvl:expr, $arg:expr) => ({
|
||||||
|
@ -821,7 +821,7 @@ pub fn std_macros() -> @str {
|
||||||
if lvl <= __log_level() {
|
if lvl <= __log_level() {
|
||||||
format_args!(|args| {
|
format_args!(|args| {
|
||||||
::std::logging::log(lvl, args)
|
::std::logging::log(lvl, args)
|
||||||
}, \"{}\", format!(\"{:?}\", $arg))
|
}, \"{}\", fmt!(\"{:?}\", $arg))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
($lvl:expr, $($arg:expr),+) => ({
|
($lvl:expr, $($arg:expr),+) => ({
|
||||||
|
@ -829,7 +829,7 @@ pub fn std_macros() -> @str {
|
||||||
if lvl <= __log_level() {
|
if lvl <= __log_level() {
|
||||||
format_args!(|args| {
|
format_args!(|args| {
|
||||||
::std::logging::log(lvl, 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!())
|
::std::sys::FailWithCause::fail_with($msg, file!(), line!())
|
||||||
);
|
);
|
||||||
($( $arg:expr ),+) => (
|
($( $arg:expr ),+) => (
|
||||||
::std::sys::FailWithCause::fail_with(format!( $($arg),+ ), file!(), line!())
|
::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue