@@ -29,7 +29,7 @@ use crate::{fmt, intrinsics, process, thread};
2929
3030// This forces codegen of the function called by panic!() inside the std crate, rather than in
3131// downstream crates. Primarily this is useful for rustc's codegen tests, which rely on noticing
32- // complete removal of panic from generated IR. Since begin_panic is inline(never), it's only
32+ // complete removal of panic from generated IR. Since panic_with_payload is inline(never), it's only
3333// codegen'd once per crate-graph so this pushes that to std rather than our codegen test crates.
3434//
3535// (See https://github.com/rust-lang/rust/pull/123244 for more info on why).
@@ -41,7 +41,7 @@ use crate::{fmt, intrinsics, process, thread};
4141#[ allow( dead_code) ]
4242#[ used( compiler) ]
4343pub static EMPTY_PANIC : fn ( & ' static str ) -> ! =
44- begin_panic :: < & ' static str > as fn ( & ' static str ) -> !;
44+ panic_with_payload :: < & ' static str > as fn ( & ' static str ) -> !;
4545
4646// Binary interface to the panic runtime that the standard library depends on.
4747//
@@ -650,7 +650,7 @@ pub fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
650650 fn take_box ( & mut self ) -> * mut ( dyn Any + Send ) {
651651 // We do two allocations here, unfortunately. But (a) they're required with the current
652652 // scheme, and (b) we don't handle panic + OOM properly anyway (see comment in
653- // begin_panic below).
653+ // panic_with_payload below).
654654 let contents = mem:: take ( self . fill ( ) ) ;
655655 Box :: into_raw ( Box :: new ( contents) )
656656 }
@@ -725,7 +725,7 @@ pub fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
725725#[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
726726#[ track_caller]
727727#[ rustc_do_not_const_check] // hooked by const-eval
728- pub const fn begin_panic < M : Any + Send > ( msg : M ) -> ! {
728+ pub const fn panic_with_payload < M : Any + Send > ( msg : M ) -> ! {
729729 if cfg ! ( feature = "panic_immediate_abort" ) {
730730 intrinsics:: abort ( )
731731 }
0 commit comments