1 // revisions: x86_64 aarch64
4 //[aarch64] only-aarch64
6 #![feature(naked_functions)]
10 extern "C" fn trait_associated(a: usize, b: usize) -> usize;
11 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize;
17 pub extern "C" fn function(a: usize, b: usize) -> usize {
18 //~^ ERROR unused variable: `a`
19 //~| ERROR unused variable: `b`
20 unsafe { asm!("", options(noreturn)); }
26 pub extern "C" fn associated(a: usize, b: usize) -> usize {
27 //~^ ERROR unused variable: `a`
28 //~| ERROR unused variable: `b`
29 unsafe { asm!("", options(noreturn)); }
32 pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
33 //~^ ERROR unused variable: `a`
34 //~| ERROR unused variable: `b`
35 unsafe { asm!("", options(noreturn)); }
39 impl super::Trait for Normal {
40 extern "C" fn trait_associated(a: usize, b: usize) -> usize {
41 //~^ ERROR unused variable: `a`
42 //~| ERROR unused variable: `b`
43 unsafe { asm!("", options(noreturn)); }
46 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
47 //~^ ERROR unused variable: `a`
48 //~| ERROR unused variable: `b`
49 unsafe { asm!("", options(noreturn)); }
58 pub extern "C" fn function(a: usize, b: usize) -> usize {
59 unsafe { asm!("", options(noreturn)); }
66 pub extern "C" fn associated(a: usize, b: usize) -> usize {
67 unsafe { asm!("", options(noreturn)); }
71 pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
72 unsafe { asm!("", options(noreturn)); }
76 impl super::Trait for Naked {
78 extern "C" fn trait_associated(a: usize, b: usize) -> usize {
79 unsafe { asm!("", options(noreturn)); }
83 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
84 unsafe { asm!("", options(noreturn)); }