diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-06-15 17:56:01 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-06-15 17:56:01 +0000 |
| commit | 81ea0b29ea3a8d426e8cf8362fefaa61906c1b91 (patch) | |
| tree | 71a2b20667ca38e5029ca03a98f22c949993e9ee /example/alloc_example.rs | |
| parent | 2445d740f741c9d0954822ef0f0cd0c2a1c6acd2 (diff) | |
| download | rust-81ea0b29ea3a8d426e8cf8362fefaa61906c1b91.tar.gz rust-81ea0b29ea3a8d426e8cf8362fefaa61906c1b91.zip | |
Merge commit '8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807' into sync_cg_clif-2023-06-15
Diffstat (limited to 'example/alloc_example.rs')
| -rw-r--r-- | example/alloc_example.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/example/alloc_example.rs b/example/alloc_example.rs index d994e2fbc0a..117eed5afd8 100644 --- a/example/alloc_example.rs +++ b/example/alloc_example.rs @@ -1,4 +1,4 @@ -#![feature(start, core_intrinsics, alloc_error_handler)] +#![feature(start, core_intrinsics, alloc_error_handler, lang_items)] #![no_std] extern crate alloc; @@ -27,6 +27,11 @@ fn alloc_error_handler(_: alloc::alloc::Layout) -> ! { core::intrinsics::abort(); } +#[lang = "eh_personality"] +fn eh_personality() -> ! { + loop {} +} + #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { let world: Box<&str> = Box::new("Hello World!\0"); |
