diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-07-09 16:45:50 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-07-28 16:12:25 +0200 |
| commit | b64c4f9560e370eb718dfd266d9251d0394e6857 (patch) | |
| tree | cc6672ce7f93f6aed242595e8cd84dee1bdafee5 /library/std/src/panic.rs | |
| parent | 76cf1b8bd03142eacee3bd31ca4651f0ce0431ca (diff) | |
| download | rust-b64c4f9560e370eb718dfd266d9251d0394e6857.tar.gz rust-b64c4f9560e370eb718dfd266d9251d0394e6857.zip | |
Add new const_format_args!() macro and use it in panics.
Diffstat (limited to 'library/std/src/panic.rs')
| -rw-r--r-- | library/std/src/panic.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 7bc987db881..3b3996e437c 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -20,7 +20,7 @@ use crate::thread::Result; #[doc(hidden)] #[unstable(feature = "edition_panic", issue = "none", reason = "use panic!() instead")] -#[allow_internal_unstable(libstd_sys_internals)] +#[allow_internal_unstable(libstd_sys_internals, const_format_args)] #[cfg_attr(not(test), rustc_diagnostic_item = "std_panic_2015_macro")] #[rustc_macro_transparency = "semitransparent"] pub macro panic_2015 { @@ -31,7 +31,7 @@ pub macro panic_2015 { $crate::rt::begin_panic($msg) }), ($fmt:expr, $($arg:tt)+) => ({ - $crate::rt::begin_panic_fmt(&$crate::format_args!($fmt, $($arg)+)) + $crate::rt::begin_panic_fmt(&$crate::const_format_args!($fmt, $($arg)+)) }), } |
