Emit builtin#format_args in builtin format_args expander

This commit is contained in:
Lukas Wirth 2023-09-06 18:00:30 +02:00
parent 5fdd1e36e3
commit c0e402637e
15 changed files with 146 additions and 341 deletions

View file

@ -1352,8 +1352,6 @@ mod macros {
/* compiler built-in */
};
}
pub(crate) use panic;
// endregion:panic
// region:fmt
@ -1364,7 +1362,20 @@ mod macros {
($fmt:expr, $($args:tt)*) => {{ /* compiler built-in */ }};
}
pub(crate) use const_format_args;
#[macro_export]
#[rustc_builtin_macro]
macro_rules! format_args {
($fmt:expr) => {{ /* compiler built-in */ }};
($fmt:expr, $($args:tt)*) => {{ /* compiler built-in */ }};
}
#[macro_export]
macro_rules! print {
($($arg:tt)*) => {{
$crate::io::_print($crate::format_args!($($arg)*));
}};
}
// endregion:fmt
// region:derive