1111
1212use core:: panic:: Location ;
1313#[ cfg( not( target_os = "solana" ) ) ]
14- use core:: panic:: PanicPayload ;
1514// make sure to use the stderr output configured
1615// by libtest in the real copy of std
1716#[ cfg( all( test, not( target_family = "solana" ) ) ) ]
@@ -72,7 +71,7 @@ extern "C" fn __rust_foreign_exception() -> ! {
7271 rtabort ! ( "Rust cannot catch foreign exceptions" ) ;
7372}
7473
75- #[ cfg( not( target_os = "solana" ) ) ]
74+ #[ cfg( not( target_family = "solana" ) ) ]
7675enum Hook {
7776 Default ,
7877 Custom ( Box < dyn Fn ( & PanicHookInfo < ' _ > ) + ' static + Sync + Send > ) ,
@@ -89,15 +88,15 @@ impl Hook {
8988 }
9089}
9190
92- #[ cfg( not( target_os = "solana" ) ) ]
91+ #[ cfg( not( target_family = "solana" ) ) ]
9392impl Default for Hook {
9493 #[ inline]
9594 fn default ( ) -> Hook {
9695 Hook :: Default
9796 }
9897}
9998
100- #[ cfg( not( target_os = "solana" ) ) ]
99+ #[ cfg( not( target_family = "solana" ) ) ]
101100static HOOK : RwLock < Hook > = RwLock :: new ( Hook :: Default ) ;
102101
103102/// Registers a custom panic hook, replacing the previously registered hook.
@@ -437,7 +436,7 @@ pub mod panic_count {
437436 //
438437 // This also updates thread-local state to keep track of whether a panic
439438 // hook is currently executing.
440- #[ cfg( not( target_os = "solana" ) ) ]
439+ #[ cfg( not( target_family = "solana" ) ) ]
441440 pub fn increase ( run_panic_hook : bool ) -> Option < MustAbort > {
442441 let global_count = GLOBAL_PANIC_COUNT . fetch_add ( 1 , Ordering :: Relaxed ) ;
443442 if global_count & ALWAYS_ABORT_FLAG != 0 {
@@ -505,7 +504,7 @@ pub mod panic_count {
505504
506505 // Slow path is in a separate function to reduce the amount of code
507506 // inlined from `count_is_zero`.
508- #[ cfg( not( target_os = "solana" ) ) ]
507+ #[ cfg( not( target_family = "solana" ) ) ]
509508 #[ inline( never) ]
510509 #[ cold]
511510 fn is_zero_slow_path ( ) -> bool {
0 commit comments