@@ -39,12 +39,7 @@ use crate::panic::{Location, PanicInfo};
3939#[ lang = "panic" ] // needed by codegen for panic on overflow and other `Assert` MIR terminators
4040pub fn panic ( expr : & str ) -> ! {
4141 if cfg ! ( feature = "panic_immediate_abort" ) {
42- // remove `unsafe` (and safety comment) on bootstrap bump
43- #[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ]
44- // SAFETY: the `abort` intrinsic has no requirements to be called.
45- unsafe {
46- super :: intrinsics:: abort ( )
47- }
42+ super :: intrinsics:: abort ( )
4843 }
4944
5045 // Use Arguments::new_v1 instead of format_args!("{}", expr) to potentially
@@ -62,12 +57,7 @@ pub fn panic(expr: &str) -> ! {
6257#[ lang = "panic_bounds_check" ] // needed by codegen for panic on OOB array/slice access
6358fn panic_bounds_check ( index : usize , len : usize ) -> ! {
6459 if cfg ! ( feature = "panic_immediate_abort" ) {
65- // remove `unsafe` (and safety comment) on bootstrap bump
66- #[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ]
67- // SAFETY: the `abort` intrinsic has no requirements to be called.
68- unsafe {
69- super :: intrinsics:: abort ( )
70- }
60+ super :: intrinsics:: abort ( )
7161 }
7262
7363 panic ! ( "index out of bounds: the len is {} but the index is {}" , len, index)
@@ -80,12 +70,7 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
8070#[ track_caller]
8171pub fn panic_fmt ( fmt : fmt:: Arguments < ' _ > ) -> ! {
8272 if cfg ! ( feature = "panic_immediate_abort" ) {
83- // remove `unsafe` (and safety comment) on bootstrap bump
84- #[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ]
85- // SAFETY: the `abort` intrinsic has no requirements to be called.
86- unsafe {
87- super :: intrinsics:: abort ( )
88- }
73+ super :: intrinsics:: abort ( )
8974 }
9075
9176 // NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call
0 commit comments