diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 1 | ||||
-rw-r--r-- | src/system_alloc.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index c6ec961..4283396 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); diff --git a/src/system_alloc.rs b/src/system_alloc.rs index ad1afcb..7c0bac9 100644 --- a/src/system_alloc.rs +++ b/src/system_alloc.rs @@ -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"); |