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) -> ! {
166
166
#[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
167
167
#[ track_caller]
168
168
#[ 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
169
170
fn panic_misaligned_pointer_dereference ( required : usize , found : usize ) -> ! {
170
171
if cfg ! ( feature = "panic_immediate_abort" ) {
171
172
super :: intrinsics:: abort ( )
172
173
}
173
174
174
- panic ! (
175
+ panic_nounwind_fmt ( format_args ! (
175
176
"misaligned pointer dereference: address must be a multiple of {required:#x} but is {found:#x}"
176
- )
177
+ ) )
177
178
}
178
179
179
180
/// Panic because we cannot unwind out of a function.
You can’t perform that action at this time.
0 commit comments