From 41a2260bc7d7388a6ef2b0dfa7a980c977e26081 Mon Sep 17 00:00:00 2001 From: tiif Date: Mon, 12 May 2025 09:23:30 +0200 Subject: [PATCH] Use unreachable instead of panic Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> --- compiler/rustc_target/src/callconv/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/callconv/mod.rs b/compiler/rustc_target/src/callconv/mod.rs index 6aae8bc75560..a141accb7380 100644 --- a/compiler/rustc_target/src/callconv/mod.rs +++ b/compiler/rustc_target/src/callconv/mod.rs @@ -919,7 +919,7 @@ fn conv_to_externabi(conv: &Conv) -> ExternAbi { Conv::AvrNonBlockingInterrupt => ExternAbi::AvrNonBlockingInterrupt, Conv::RiscvInterrupt { kind: RiscvInterruptKind::Machine } => ExternAbi::RiscvInterruptM, Conv::RiscvInterrupt { kind: RiscvInterruptKind::Supervisor } => ExternAbi::RiscvInterruptS, - Conv::Cold | Conv::PreserveAll => panic!("This is deadcode"), + Conv::Cold | Conv::PreserveAll => unreachable!(), } }