diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2023-10-09 11:08:42 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-10-09 11:08:42 -0400 |
| commit | ad5637468e8cc1e3de1c8b9454dec01ae5b2b60a (patch) | |
| tree | 34f94a8182704addaec7256defd74aa462c0b7d8 | |
| parent | e7f7fb87ddd9ddfa4c52c6b683a501a9ab3eba8b (diff) | |
| download | rust-ad5637468e8cc1e3de1c8b9454dec01ae5b2b60a.tar.gz rust-ad5637468e8cc1e3de1c8b9454dec01ae5b2b60a.zip | |
Add missing panic_in_cleanup
| -rw-r--r-- | example/mini_core.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index 58df29bb625..34328520343 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -429,6 +429,15 @@ fn panic_cannot_unwind() -> ! { } } +#[lang = "panic_in_cleanup"] +#[rustc_nounwind] +fn panic_in_cleanup() -> ! { + unsafe { + libc::printf("panic in a destructor during cleanup\n\0" as *const str as *const i8); + intrinsics::abort(); + } +} + #[lang = "panic_bounds_check"] #[track_caller] fn panic_bounds_check(index: usize, len: usize) -> ! { |
