about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example
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
commit41ddf8672231c1f8cfa0fc754c1653f151030b19 (patch)
tree005cc521b545437b4f34871d8149c82b5d6827d9 /compiler/rustc_codegen_cranelift/example
parent191df20fcad9331d3a948aa8e8556775ec3fe69d (diff)
downloadrust-41ddf8672231c1f8cfa0fc754c1653f151030b19.tar.gz
rust-41ddf8672231c1f8cfa0fc754c1653f151030b19.zip
Make `#[naked]` an unsafe attribute
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example')
-rw-r--r--compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
index 09d5b73fd3d..0b3a7281d5a 100644
--- a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
+++ b/compiler/rustc_codegen_cranelift/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)]