about summary refs log tree commit diff
path: root/example/alloc_example.rs
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2022-10-01 19:53:14 -0400
committerAntoni Boucher <bouanto@zoho.com>2022-10-01 19:53:14 -0400
commita28618d2efbbc903c66689e12d47f6f341c6c0f8 (patch)
treeb5b7f385a31a82ea767d8bf1f3c764fe2cf8a6cb /example/alloc_example.rs
parent6f1adbd9e33a6e9d6d79dfbee0f682a4ef2b4124 (diff)
downloadrust-a28618d2efbbc903c66689e12d47f6f341c6c0f8.tar.gz
rust-a28618d2efbbc903c66689e12d47f6f341c6c0f8.zip
Fix warnings
Diffstat (limited to 'example/alloc_example.rs')
-rw-r--r--example/alloc_example.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/example/alloc_example.rs b/example/alloc_example.rs
index 74ea7ec4ede..c327b93f1bb 100644
--- a/example/alloc_example.rs
+++ b/example/alloc_example.rs
@@ -18,16 +18,12 @@ extern "C" {
 
 #[panic_handler]
 fn panic_handler(_: &core::panic::PanicInfo) -> ! {
-    unsafe {
-        core::intrinsics::abort();
-    }
+    core::intrinsics::abort();
 }
 
 #[alloc_error_handler]
 fn alloc_error_handler(_: alloc::alloc::Layout) -> ! {
-    unsafe {
-        core::intrinsics::abort();
-    }
+    core::intrinsics::abort();
 }
 
 #[start]