1 // Checks that #[naked] attribute can be placed on function definitions only.
5 #![feature(naked_functions)]
6 #![naked] //~ ERROR should be applied to a function definition
9 #[naked] //~ ERROR should be applied to a function definition
13 #[naked] //~ ERROR should be applied to a function definition
21 #[naked] //~ ERROR should be applied to a function definition
22 extern "C" fn invoke(&self);
27 extern "C" fn invoke(&self) {
28 unsafe { asm!("", options(noreturn)) }
34 unsafe { asm!("", options(noreturn)) }
40 unsafe { asm!("", options(noreturn)) }
44 extern "C" fn h(&self) {
45 unsafe { asm!("", options(noreturn)) }
50 #[naked] || {}; //~ ERROR should be applied to a function definition