rust/tests/ui/feature-gates/feature-gate-naked_functions_target_feature.rs
2025-04-20 11:18:38 +02:00

13 lines
277 B
Rust

//@ needs-asm-support
//@ only-x86_64
use std::arch::naked_asm;
#[unsafe(naked)]
#[target_feature(enable = "avx2")]
//~^ ERROR: `#[target_feature(/* ... */)]` is currently unstable on `#[naked]` functions
extern "C" fn naked() {
unsafe { naked_asm!("") }
}
fn main() {}