1
Fork 0
This commit is contained in:
bjorn3 2023-04-29 11:10:56 +00:00
commit 72022bb24d
5 changed files with 31 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#![feature(start, core_intrinsics)]
#![feature(start, core_intrinsics, alloc_error_handler)]
#![no_std]
extern crate alloc;
@ -22,6 +22,11 @@ fn panic_handler(_: &core::panic::PanicInfo<'_>) -> ! {
core::intrinsics::abort();
}
#[alloc_error_handler]
fn alloc_error_handler(_: alloc::alloc::Layout) -> ! {
core::intrinsics::abort();
}
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
let world: Box<&str> = Box::new("Hello World!\0");