diff --git a/Cargo.toml b/Cargo.toml
index acff39b..edba4c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,4 +6,5 @@ edition = "2021"
 [dependencies]
 
 [profile.release]
-lto = true
\ No newline at end of file
+lto = true
+panic = "abort"
\ No newline at end of file
diff --git a/src/main.rs b/src/main.rs
index 3dc92e1..649be07 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,15 +1,10 @@
-#![feature(lang_items)]
-#![allow(improper_ctypes_definitions)]
 #![no_std]
 #![no_main]
 
 #[no_mangle]
 pub extern "C" fn main() {}
 
-#[lang = "eh_personality"]
-pub unsafe extern "C" fn rust_eh_personality() -> () {}
-
-#[lang = "panic_impl"]
+#[panic_handler]
 fn panic(_info: &::core::panic::PanicInfo) -> ! {
     loop {}
 }