Fix --all-targets build
This commit is contained in:
parent
acafb83a63
commit
85d52f3db6
2 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ pub extern "C" fn main(_nargs: libc::c_int, _args: *const *const libc::c_char) -
|
|||
0
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[panic_handler]
|
||||
fn panic(info: &core::panic::PanicInfo) -> ! {
|
||||
let _ = writeln!(libc::stdio::stderr(), "Panic: {}", info);
|
||||
|
|
|
@ -15,6 +15,7 @@ unsafe impl alloc::alloc::GlobalAlloc for System {
|
|||
#[global_allocator]
|
||||
static SYSTEM_ALLOC: System = System;
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[alloc_error_handler]
|
||||
fn alloc_error(_: core::alloc::Layout) -> ! {
|
||||
panic!("allocation failure");
|
||||
|
|
Reference in a new issue