]> git.lizzy.rs Git - rust.git/blobdiff - src/test/debuginfo/function-arguments-naked.rs
pin docs: add some forward references
[rust.git] / src / test / debuginfo / function-arguments-naked.rs
index e88a99b322ed56d5f050be1f8a50201d2e1b7fb2..5f3a1eb44e4e55179eeb49b90ae3182d6198aed7 100644 (file)
@@ -3,6 +3,9 @@
 // We have to ignore android because of this issue:
 // https://github.com/rust-lang/rust/issues/74847
 // ignore-android
+//
+// We need to use inline assembly, so just use one platform
+// only-x86_64
 
 // compile-flags:-g
 
@@ -24,6 +27,7 @@
 // lldb-command:continue
 
 
+#![feature(asm)]
 #![feature(naked_functions)]
 #![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
@@ -33,8 +37,6 @@ fn main() {
 }
 
 #[naked]
-fn naked(x: usize, y: usize) {
-    zzz(); // #break
+extern "C" fn naked(x: usize, y: usize) {
+    unsafe { asm!("ret"); } // #break
 }
-
-fn zzz() { () }