about summary refs log tree commit diff
path: root/tests/ui/asm/named-asm-labels.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/asm/named-asm-labels.rs')
-rw-r--r--tests/ui/asm/named-asm-labels.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/ui/asm/named-asm-labels.rs b/tests/ui/asm/named-asm-labels.rs
index 77831e679ed..996fb82a944 100644
--- a/tests/ui/asm/named-asm-labels.rs
+++ b/tests/ui/asm/named-asm-labels.rs
@@ -10,8 +10,6 @@
 // which causes less readable LLVM errors and in the worst cases causes ICEs
 // or segfaults based on system dependent behavior and codegen flags.
 
-#![feature(naked_functions)]
-
 use std::arch::{asm, global_asm, naked_asm};
 
 #[no_mangle]
@@ -175,9 +173,9 @@ fn main() {
 
 // Trigger on naked fns too, even though they can't be inlined, reusing a
 // label or LTO can cause labels to break
-#[naked]
+#[unsafe(naked)]
 pub extern "C" fn foo() -> i32 {
-    unsafe { naked_asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1) }
+    naked_asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1)
     //~^ ERROR avoid using named labels
 }
 
@@ -188,21 +186,21 @@ pub extern "C" fn bar() {
     //~^ ERROR avoid using named labels
 }
 
-#[naked]
+#[unsafe(naked)]
 pub extern "C" fn aaa() {
     fn _local() {}
 
-    unsafe { naked_asm!(".Laaa: nop; ret;") } //~ ERROR avoid using named labels
+    naked_asm!(".Laaa: nop; ret;") //~ ERROR avoid using named labels
 }
 
 pub fn normal() {
     fn _local1() {}
 
-    #[naked]
+    #[unsafe(naked)]
     pub extern "C" fn bbb() {
         fn _very_local() {}
 
-        unsafe { naked_asm!(".Lbbb: nop; ret;") } //~ ERROR avoid using named labels
+        naked_asm!(".Lbbb: nop; ret;") //~ ERROR avoid using named labels
     }
 
     fn _local2() {}
@@ -219,8 +217,8 @@ fn closures() {
     };
 
     || {
-        #[naked]
-        unsafe extern "C" fn _nested() {
+        #[unsafe(naked)]
+        extern "C" fn _nested() {
             naked_asm!("ret;");
         }