File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -166,14 +166,15 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
166166#[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
167167#[ track_caller]
168168#[ lang = "panic_misaligned_pointer_dereference" ] // needed by codegen for panic on misaligned pointer deref
169+ #[ rustc_nounwind] // `CheckAlignment` MIR pass requires this function to never unwind
169170fn panic_misaligned_pointer_dereference ( required : usize , found : usize ) -> ! {
170171 if cfg ! ( feature = "panic_immediate_abort" ) {
171172 super :: intrinsics:: abort ( )
172173 }
173174
174- panic ! (
175+ panic_nounwind_fmt ( format_args ! (
175176 "misaligned pointer dereference: address must be a multiple of {required:#x} but is {found:#x}"
176- )
177+ ) )
177178}
178179
179180/// Panic because we cannot unwind out of a function.
You can’t perform that action at this time.
0 commit comments