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

@ -53,7 +53,7 @@ impl<'tcx> LateLintPass<'tcx> for NonPanicFmt {
if Some(def_id) == cx.tcx.lang_items().begin_panic_fn()
|| Some(def_id) == cx.tcx.lang_items().panic_fn()
|| f_diagnostic_name == Some(sym::panic_str)
|| f_diagnostic_name == Some(sym::panic_str_2015)
{
if let Some(id) = f.span.ctxt().outer_expn_data().macro_def_id {
if matches!(