about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2023-01-08 11:42:00 -0500
committerAntoni Boucher <bouanto@zoho.com>2023-01-08 11:42:00 -0500
commit70659f7591b9ecc4a92df9d45c1d18e750a5339b (patch)
treeb9859462cbd11afa2d9edb51446ac802a201d311 /example
parenta4b74e3adf214d985c541eb7d005bb77e59338f5 (diff)
downloadrust-70659f7591b9ecc4a92df9d45c1d18e750a5339b.tar.gz
rust-70659f7591b9ecc4a92df9d45c1d18e750a5339b.zip
Cleanup
Diffstat (limited to 'example')
-rw-r--r--example/alloc_example.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/example/alloc_example.rs b/example/alloc_example.rs
index c327b93f1bb..c80348ca549 100644
--- a/example/alloc_example.rs
+++ b/example/alloc_example.rs
@@ -1,4 +1,4 @@
-#![feature(start, box_syntax, core_intrinsics, alloc_error_handler)]
+#![feature(start, box_syntax, core_intrinsics, alloc_error_handler, lang_items)]
 #![no_std]
 
 extern crate alloc;
@@ -26,6 +26,16 @@ fn alloc_error_handler(_: alloc::alloc::Layout) -> ! {
     core::intrinsics::abort();
 }
 
+#[lang = "eh_personality"]
+fn eh_personality() -> ! {
+    loop {}
+}
+
+#[no_mangle]
+unsafe extern "C" fn _Unwind_Resume() {
+    core::intrinsics::unreachable();
+}
+
 #[start]
 fn main(_argc: isize, _argv: *const *const u8) -> isize {
     let world: Box<&str> = box "Hello World!\0";