@@ -23,8 +23,8 @@ use crate::mem::{self, ManuallyDrop};
23
23
use crate :: panic:: { BacktraceStyle , PanicHookInfo } ;
24
24
use crate :: sync:: atomic:: { AtomicBool , Ordering } ;
25
25
use crate :: sync:: { PoisonError , RwLock } ;
26
+ use crate :: sys:: backtrace;
26
27
use crate :: sys:: stdio:: panic_output;
27
- use crate :: sys:: { backtrace, dbg} ;
28
28
use crate :: { fmt, intrinsics, process, thread} ;
29
29
30
30
// 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>) -> ! {
859
859
#[ cfg_attr( not( test) , rustc_std_internal_symbol) ]
860
860
#[ cfg( not( feature = "panic_immediate_abort" ) ) ]
861
861
fn 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
-
870
862
let code = unsafe { __rust_start_panic ( msg) } ;
871
863
rtabort ! ( "failed to initiate panic, error {code}" )
872
864
}
873
865
874
866
#[ cfg_attr( not( test) , rustc_std_internal_symbol) ]
875
867
#[ cfg( feature = "panic_immediate_abort" ) ]
876
868
fn 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
-
885
869
unsafe {
886
870
crate :: intrinsics:: abort ( ) ;
887
871
}
0 commit comments