diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2023-09-06 18:00:30 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2023-09-06 18:08:20 +0200 |
| commit | c0e402637eeff7dea29082f983f26be4ef2e317c (patch) | |
| tree | d910cd14cdfc323f48063875ceb910f3c3071692 /crates/test-utils | |
| parent | 5fdd1e36e358019e2d58e64483717d533c04d7e7 (diff) | |
| download | rust-c0e402637eeff7dea29082f983f26be4ef2e317c.tar.gz rust-c0e402637eeff7dea29082f983f26be4ef2e317c.zip | |
Emit builtin#format_args in builtin format_args expander
Diffstat (limited to 'crates/test-utils')
| -rw-r--r-- | crates/test-utils/src/minicore.rs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs index 0fc95635e66..573f56b003a 100644 --- a/crates/test-utils/src/minicore.rs +++ b/crates/test-utils/src/minicore.rs @@ -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 |
