Skip to content

Commit ad56374

Browse files
committed
Add missing panic_in_cleanup
1 parent e7f7fb8 commit ad56374

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

example/mini_core.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,15 @@ fn panic_cannot_unwind() -> ! {
429429
}
430430
}
431431

432+
#[lang = "panic_in_cleanup"]
433+
#[rustc_nounwind]
434+
fn panic_in_cleanup() -> ! {
435+
unsafe {
436+
libc::printf("panic in a destructor during cleanup\n\0" as *const str as *const i8);
437+
intrinsics::abort();
438+
}
439+
}
440+
432441
#[lang = "panic_bounds_check"]
433442
#[track_caller]
434443
fn panic_bounds_check(index: usize, len: usize) -> ! {

0 commit comments

Comments
 (0)