]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/feature-gates/feature-gate-naked_functions.rs
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-naked_functions.rs
index 16a51a1e82fc664f1928fbbcece5d6d05acfdb11..06bddc422cf80847318e87d4cd761af49f890172 100644 (file)
@@ -1,11 +1,15 @@
+#![feature(asm)]
+
 #[naked]
 //~^ the `#[naked]` attribute is an experimental feature
-fn naked() {}
+extern "C" fn naked() {
+    asm!("", options(noreturn))
+}
 
 #[naked]
 //~^ the `#[naked]` attribute is an experimental feature
-fn naked_2() -> isize {
-    0
+extern "C" fn naked_2() -> isize {
+    asm!("", options(noreturn))
 }
 
 fn main() {}