You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
514 B

// Rust language features implementations
use core::panic::PanicInfo;
use core::alloc::Layout;
use log::*;
#[lang = "eh_personality"]
extern fn eh_personality() {
}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
let location = info.location().unwrap();
let message = info.message().unwrap();
error!("\n\nPANIC in {} at line {}\n {}", location.file(), location.line(), message);
loop { crate::arch::cpu::halt() }
}
#[lang = "oom"]
fn oom(_: Layout) -> ! {
panic!("out of memory");
}