]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-naked_functions.rs
Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau
[rust.git] / src / test / ui / feature-gates / feature-gate-naked_functions.rs
1 // needs-asm-support
2
3 use std::arch::asm;
4
5 #[naked]
6 //~^ the `#[naked]` attribute is an experimental feature
7 extern "C" fn naked() {
8     asm!("", options(noreturn))
9 }
10
11 #[naked]
12 //~^ the `#[naked]` attribute is an experimental feature
13 extern "C" fn naked_2() -> isize {
14     asm!("", options(noreturn))
15 }
16
17 fn main() {}