@@ -27,35 +27,40 @@ where
2727 }
2828}
2929
30- #[ inline( never) ]
30+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
31+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
3132#[ cold]
3233#[ track_caller]
3334fn slice_start_index_len_fail ( index : usize , len : usize ) -> ! {
3435 panic ! ( "range start index {} out of range for slice of length {}" , index, len) ;
3536}
3637
37- #[ inline( never) ]
38+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
39+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
3840#[ cold]
3941#[ track_caller]
4042fn slice_end_index_len_fail ( index : usize , len : usize ) -> ! {
4143 panic ! ( "range end index {} out of range for slice of length {}" , index, len) ;
4244}
4345
44- #[ inline( never) ]
46+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
47+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
4548#[ cold]
4649#[ track_caller]
4750fn slice_index_order_fail ( index : usize , end : usize ) -> ! {
4851 panic ! ( "slice index starts at {} but ends at {}" , index, end) ;
4952}
5053
51- #[ inline( never) ]
54+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
55+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
5256#[ cold]
5357#[ track_caller]
5458fn slice_start_index_overflow_fail ( ) -> ! {
5559 panic ! ( "attempted to index slice from after maximum usize" ) ;
5660}
5761
58- #[ inline( never) ]
62+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
63+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
5964#[ cold]
6065#[ track_caller]
6166fn slice_end_index_overflow_fail ( ) -> ! {
0 commit comments