@@ -23,8 +23,8 @@ use crate::mem::{self, ManuallyDrop};
2323use crate :: panic:: { BacktraceStyle , PanicHookInfo } ;
2424use crate :: sync:: atomic:: { AtomicBool , Ordering } ;
2525use crate :: sync:: { PoisonError , RwLock } ;
26+ use crate :: sys:: backtrace;
2627use crate :: sys:: stdio:: panic_output;
27- use crate :: sys:: { backtrace, dbg} ;
2828use crate :: { fmt, intrinsics, process, thread} ;
2929
3030// Binary interface to the panic runtime that the standard library depends on.
@@ -859,29 +859,13 @@ pub fn rust_panic_without_hook(payload: Box<dyn Any + Send>) -> ! {
859859#[ cfg_attr( not( test) , rustc_std_internal_symbol) ]
860860#[ cfg( not( feature = "panic_immediate_abort" ) ) ]
861861fn rust_panic ( msg : & mut dyn PanicPayload ) -> ! {
862- // Break into the debugger if it is attached.
863- // The return value is not currently used.
864- //
865- // This function isn't used anywhere else, and
866- // using inside `#[panic_handler]` doesn't seem
867- // to count, so a warning is issued.
868- let _ = dbg:: breakpoint_if_debugging ( ) ;
869-
870862 let code = unsafe { __rust_start_panic ( msg) } ;
871863 rtabort ! ( "failed to initiate panic, error {code}" )
872864}
873865
874866#[ cfg_attr( not( test) , rustc_std_internal_symbol) ]
875867#[ cfg( feature = "panic_immediate_abort" ) ]
876868fn rust_panic ( _: & mut dyn PanicPayload ) -> ! {
877- // Break into the debugger if it is attached.
878- // The return value is not currently used.
879- //
880- // This function isn't used anywhere else, and
881- // using inside `#[panic_handler]` doesn't seem
882- // to count, so a warning is issued.
883- let _ = dbg:: breakpoint_if_debugging ( ) ;
884-
885869 unsafe {
886870 crate :: intrinsics:: abort ( ) ;
887871 }
0 commit comments