Shorten lifetime of panic temporaries in panic_fmt case
This commit is contained in:
@@ -26,7 +26,9 @@ pub macro panic_2015 {
|
||||
$crate::rt::panic_display(&$arg)
|
||||
}),
|
||||
($fmt:expr, $($arg:tt)+) => ({
|
||||
$crate::rt::panic_fmt($crate::const_format_args!($fmt, $($arg)+))
|
||||
// Semicolon to prevent temporaries inside the formatting machinery from
|
||||
// being considered alive in the caller after the panic_fmt call.
|
||||
$crate::rt::panic_fmt($crate::const_format_args!($fmt, $($arg)+));
|
||||
}),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user