panic_str only exists for the migration to 2021 panic macros

This commit is contained in:
Ralf Jung
2024-03-25 20:36:13 +01:00
parent 8b9e47c136
commit 6e190fa993
5 changed files with 23 additions and 16 deletions

View File

@@ -27,9 +27,9 @@ pub macro panic_2015 {
($msg:literal $(,)?) => (
$crate::panicking::panic($msg)
),
// Use `panic_str` instead of `panic_display::<&str>` for non_fmt_panic lint.
// Use `panic_str_2015` instead of `panic_display::<&str>` for non_fmt_panic lint.
($msg:expr $(,)?) => ({
$crate::panicking::panic_str($msg);
$crate::panicking::panic_str_2015($msg);
}),
// Special-case the single-argument case for const_panic.
("{}", $arg:expr $(,)?) => ({