Shorten lifetime of even more panic temporaries
This commit is contained in:
parent
0ebb5cbab6
commit
2f5d993945
2 changed files with 14 additions and 14 deletions
|
@ -19,11 +19,11 @@ pub macro panic_2015 {
|
|||
$crate::rt::begin_panic("explicit panic")
|
||||
}),
|
||||
($msg:expr $(,)?) => ({
|
||||
$crate::rt::begin_panic($msg)
|
||||
$crate::rt::begin_panic($msg);
|
||||
}),
|
||||
// Special-case the single-argument case for const_panic.
|
||||
("{}", $arg:expr $(,)?) => ({
|
||||
$crate::rt::panic_display(&$arg)
|
||||
$crate::rt::panic_display(&$arg);
|
||||
}),
|
||||
($fmt:expr, $($arg:tt)+) => ({
|
||||
// Semicolon to prevent temporaries inside the formatting machinery from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue