os-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.

23 lines
553 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
#[naked]
//~^ 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'
//~| ERROR: requires unsafe
2020-12-07 00:00:00 +00:00
}
#[naked]
//~^ 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'
//~| ERROR: requires unsafe
}
fn main() {}