rust/tests/ui/asm/naked-functions-ffi.rs
Folkert de Vries 562ec5a6fb disallow asm! in #[naked] functions
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
2024-10-06 18:12:25 +02:00

16 lines
276 B
Rust

//@ check-pass
//@ needs-asm-support
#![feature(naked_functions)]
#![crate_type = "lib"]
use std::arch::naked_asm;
#[naked]
pub extern "C" fn naked(p: char) -> u128 {
//~^ WARN uses type `char`
//~| WARN uses type `u128`
unsafe {
naked_asm!("");
}
}