diff options
| author | Gary Guo <gary@garyguo.net> | 2022-05-14 02:46:46 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2022-05-14 02:53:59 +0100 |
| commit | 68f063bf3fb9ca7dc585e18250ba7a75f40a245f (patch) | |
| tree | 13610e14a6bab430a6786396720d078196421007 /library/alloc | |
| parent | 6dd68402c5d7da168f87d8551dd9aed1d8a21893 (diff) | |
| download | rust-68f063bf3fb9ca7dc585e18250ba7a75f40a245f.tar.gz rust-68f063bf3fb9ca7dc585e18250ba7a75f40a245f.zip | |
Use Rust ABI for `__rust_start_panic` and `_{rdl,rg}_oom`
Diffstat (limited to 'library/alloc')
| -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 39f8f1d5a0e..da61ff1e751 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -398,13 +398,13 @@ pub mod __alloc_error_handler { // if there is no `#[alloc_error_handler]` #[rustc_std_internal_symbol] - pub unsafe extern "C-unwind" fn __rdl_oom(size: usize, _align: usize) -> ! { + pub unsafe fn __rdl_oom(size: usize, _align: usize) -> ! { panic!("memory allocation of {size} bytes failed") } // if there is an `#[alloc_error_handler]` #[rustc_std_internal_symbol] - pub unsafe extern "C-unwind" fn __rg_oom(size: usize, align: usize) -> ! { + pub unsafe fn __rg_oom(size: usize, align: usize) -> ! { let layout = unsafe { Layout::from_size_align_unchecked(size, align) }; extern "Rust" { #[lang = "oom"] |
