@@ -27,35 +27,40 @@ where
27
27
}
28
28
}
29
29
30
- #[ inline( never) ]
30
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
31
+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
31
32
#[ cold]
32
33
#[ track_caller]
33
34
fn slice_start_index_len_fail ( index : usize , len : usize ) -> ! {
34
35
panic ! ( "range start index {} out of range for slice of length {}" , index, len) ;
35
36
}
36
37
37
- #[ inline( never) ]
38
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
39
+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
38
40
#[ cold]
39
41
#[ track_caller]
40
42
fn slice_end_index_len_fail ( index : usize , len : usize ) -> ! {
41
43
panic ! ( "range end index {} out of range for slice of length {}" , index, len) ;
42
44
}
43
45
44
- #[ inline( never) ]
46
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
47
+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
45
48
#[ cold]
46
49
#[ track_caller]
47
50
fn slice_index_order_fail ( index : usize , end : usize ) -> ! {
48
51
panic ! ( "slice index starts at {} but ends at {}" , index, end) ;
49
52
}
50
53
51
- #[ inline( never) ]
54
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
55
+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
52
56
#[ cold]
53
57
#[ track_caller]
54
58
fn slice_start_index_overflow_fail ( ) -> ! {
55
59
panic ! ( "attempted to index slice from after maximum usize" ) ;
56
60
}
57
61
58
- #[ inline( never) ]
62
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
63
+ #[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
59
64
#[ cold]
60
65
#[ track_caller]
61
66
fn slice_end_index_overflow_fail ( ) -> ! {
0 commit comments