diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2021-10-04 02:02:33 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2022-02-05 20:58:04 +0000 |
| commit | 915a16035d64f2b7e676c7e77e1bf810ea448f22 (patch) | |
| tree | 2ac0ff6e49b15f6e6d0ebad7ab9288b0cfb64d32 /library/alloc/src/alloc.rs | |
| parent | b1b88109526c5324157d52ac8f09752710e95ec3 (diff) | |
| download | rust-915a16035d64f2b7e676c7e77e1bf810ea448f22.tar.gz rust-915a16035d64f2b7e676c7e77e1bf810ea448f22.zip | |
Mark __rgl_oom and __rd_oom as "C-unwind"
Diffstat (limited to 'library/alloc/src/alloc.rs')
| -rw-r--r-- | library/alloc/src/alloc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index 06ed92c6014..9d4f9af91a5 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -396,13 +396,13 @@ pub mod __alloc_error_handler { // if there is no `#[alloc_error_handler]` #[rustc_std_internal_symbol] - pub unsafe extern "C" fn __rdl_oom(size: usize, _align: usize) -> ! { + pub unsafe extern "C-unwind" fn __rdl_oom(size: usize, _align: usize) -> ! { panic!("memory allocation of {} bytes failed", size) } // if there is an `#[alloc_error_handler]` #[rustc_std_internal_symbol] - pub unsafe extern "C" fn __rg_oom(size: usize, align: usize) -> ! { + pub unsafe extern "C-unwind" fn __rg_oom(size: usize, align: usize) -> ! { let layout = unsafe { Layout::from_size_align_unchecked(size, align) }; extern "Rust" { #[lang = "oom"] |
