about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-03-29 17:30:11 +0100
committerFolkert de Vries <folkert@folkertdev.nl>2025-04-19 00:03:35 +0200
commit59c5ed0ba84d9007d8957dc1056f46bed381c100 (patch)
tree1735a6062125e2d41a5ab5311c133114587d7ff6
parentbc9dacdf9a0f123377f6f97ab23f13f5777e4041 (diff)
downloadrust-59c5ed0ba84d9007d8957dc1056f46bed381c100.tar.gz
rust-59c5ed0ba84d9007d8957dc1056f46bed381c100.zip
Make `#[naked]` an unsafe attribute
-rw-r--r--example/mini_core_hello_world.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs
index 09d5b73fd3d..0b3a7281d5a 100644
--- a/example/mini_core_hello_world.rs
+++ b/example/mini_core_hello_world.rs
@@ -387,11 +387,9 @@ global_asm! {
 }
 
 #[cfg(all(not(jit), target_arch = "x86_64"))]
-#[naked]
+#[unsafe(naked)]
 extern "C" fn naked_test() {
-    unsafe {
-        naked_asm!("ret");
-    }
+    naked_asm!("ret")
 }
 
 #[repr(C)]