solo5_rs/lang.rs
1/// Rust Language Items
2use core::panic::PanicInfo;
3
4#[panic_handler]
5pub fn panic(panic: &PanicInfo) -> ! {
6 console!("{}\n", panic);
7 unsafe { solo5_sys::solo5_abort() }
8 loop {} // Unreachable
9}
10
11#[alloc_error_handler]
12pub fn alloc_error_handler(layout: core::alloc::Layout) -> ! {
13 panic!("memory allocation of {} bytes failed", layout.size())
14}