1 // revisions: x86_64 aarch64
3 //[aarch64] only-aarch64
5 #![feature(naked_functions)]
9 extern "C" fn trait_associated(a: usize, b: usize) -> usize;
10 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize;
16 pub extern "C" fn function(a: usize, b: usize) -> usize {
17 //~^ ERROR unused variable: `a`
18 //~| ERROR unused variable: `b`
19 unsafe { asm!("", options(noreturn)); }
25 pub extern "C" fn associated(a: usize, b: usize) -> usize {
26 //~^ ERROR unused variable: `a`
27 //~| ERROR unused variable: `b`
28 unsafe { asm!("", options(noreturn)); }
31 pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
32 //~^ ERROR unused variable: `a`
33 //~| ERROR unused variable: `b`
34 unsafe { asm!("", options(noreturn)); }
38 impl super::Trait for Normal {
39 extern "C" fn trait_associated(a: usize, b: usize) -> usize {
40 //~^ ERROR unused variable: `a`
41 //~| ERROR unused variable: `b`
42 unsafe { asm!("", options(noreturn)); }
45 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
46 //~^ ERROR unused variable: `a`
47 //~| ERROR unused variable: `b`
48 unsafe { asm!("", options(noreturn)); }
57 pub extern "C" fn function(a: usize, b: usize) -> usize {
58 unsafe { asm!("", options(noreturn)); }
65 pub extern "C" fn associated(a: usize, b: usize) -> usize {
66 unsafe { asm!("", options(noreturn)); }
70 pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
71 unsafe { asm!("", options(noreturn)); }
75 impl super::Trait for Naked {
77 extern "C" fn trait_associated(a: usize, b: usize) -> usize {
78 unsafe { asm!("", options(noreturn)); }
82 extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
83 unsafe { asm!("", options(noreturn)); }