Make fmt::Arguments::as_str() return a 'static str.
This commit is contained in:
parent
e17c17a1af
commit
0c51f53edf
6 changed files with 282 additions and 291 deletions
|
@ -6,9 +6,12 @@ macro_rules! panic {
|
|||
() => (
|
||||
$crate::panic!("explicit panic")
|
||||
);
|
||||
($msg:expr) => (
|
||||
($msg:literal) => (
|
||||
$crate::panicking::panic($msg)
|
||||
);
|
||||
($msg:expr) => (
|
||||
$crate::panic!("{}", $crate::convert::identity::<&str>($msg))
|
||||
);
|
||||
($msg:expr,) => (
|
||||
$crate::panic!($msg)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue