1 // Checks that #[naked] attribute can be placed on function definitions only.
4 #![feature(naked_functions)]
5 #![naked] //~ ERROR should be applied to a function definition
10 #[naked] //~ ERROR should be applied to a function definition
14 #[naked] //~ ERROR should be applied to a function definition
22 #[naked] //~ ERROR should be applied to a function definition
23 extern "C" fn invoke(&self);
28 extern "C" fn invoke(&self) {
29 unsafe { asm!("", options(noreturn)) }
35 unsafe { asm!("", options(noreturn)) }
41 unsafe { asm!("", options(noreturn)) }
45 extern "C" fn h(&self) {
46 unsafe { asm!("", options(noreturn)) }
51 #[naked] || {}; //~ ERROR should be applied to a function definition