Sync from rust f495605381
This commit is contained in:
commit
72022bb24d
5 changed files with 31 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue