rust/tests/ui/feature-gates/feature-gate-naked_functions.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
317 B
Rust
Raw Normal View History

// needs-asm-support
use std::arch::asm;
2020-12-06 18:00:00 -06:00
#[naked]
//~^ the `#[naked]` attribute is an experimental feature
2020-12-06 18:00:00 -06:00
extern "C" fn naked() {
asm!("", options(noreturn))
}
#[naked]
//~^ the `#[naked]` attribute is an experimental feature
2020-12-06 18:00:00 -06:00
extern "C" fn naked_2() -> isize {
asm!("", options(noreturn))
}
fn main() {}