diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-05-19 00:54:23 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-05-19 00:54:23 +0200 |
commit | 85d52f3db69126ad9d374f03e32c22fded058570 (patch) | |
tree | e5b496ca74d01d0b3e56853181009549b1b76b0f | |
parent | acafb83a63b4f99b3340b84d8e1ea3ba267bd80a (diff) | |
download | neco-85d52f3db69126ad9d374f03e32c22fded058570.tar neco-85d52f3db69126ad9d374f03e32c22fded058570.zip |
Fix --all-targets build
-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"); |