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.

21 lines
595 B
Rust
Raw Normal View History

//@ needs-asm-support
use std::arch::naked_asm;
//~^ ERROR use of unstable library feature `naked_functions`
2020-12-07 00:00:00 +00:00
2025-03-29 17:30:11 +01:00
#[naked] //~ ERROR unsafe attribute used without unsafe
//~^ ERROR the `#[naked]` attribute is an experimental feature
2020-12-07 00:00:00 +00:00
extern "C" fn naked() {
naked_asm!("")
//~^ ERROR use of unstable library feature `naked_functions`
2020-12-07 00:00:00 +00:00
}
2025-03-29 17:30:11 +01:00
#[naked] //~ ERROR unsafe attribute used without unsafe
//~^ ERROR the `#[naked]` attribute is an experimental feature
2020-12-07 00:00:00 +00:00
extern "C" fn naked_2() -> isize {
naked_asm!("")
//~^ ERROR use of unstable library feature `naked_functions`
}
fn main() {}