2024-07-16 16:03:13 -05:00
|
|
|
//@ needs-asm-support
|
|
|
|
#![feature(naked_functions)]
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
2024-09-09 05:47:40 -05:00
|
|
|
use std::arch::naked_asm;
|
2024-07-16 16:03:13 -05:00
|
|
|
|
|
|
|
#[naked]
|
|
|
|
pub unsafe extern "C" fn inline_none() {
|
2024-09-09 05:47:40 -05:00
|
|
|
naked_asm!("");
|
2024-07-16 16:03:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[naked]
|
|
|
|
#[inline]
|
|
|
|
//~^ ERROR [E0736]
|
|
|
|
pub unsafe extern "C" fn inline_hint() {
|
2024-09-09 05:47:40 -05:00
|
|
|
naked_asm!("");
|
2024-07-16 16:03:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[naked]
|
|
|
|
#[inline(always)]
|
|
|
|
//~^ ERROR [E0736]
|
|
|
|
pub unsafe extern "C" fn inline_always() {
|
2024-09-09 05:47:40 -05:00
|
|
|
naked_asm!("");
|
2024-07-16 16:03:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[naked]
|
|
|
|
#[inline(never)]
|
|
|
|
//~^ ERROR [E0736]
|
|
|
|
pub unsafe extern "C" fn inline_never() {
|
2024-09-09 05:47:40 -05:00
|
|
|
naked_asm!("");
|
2024-07-16 16:03:13 -05:00
|
|
|
}
|
2024-07-17 03:42:24 -05:00
|
|
|
|
|
|
|
#[naked]
|
|
|
|
#[cfg_attr(all(), inline(never))]
|
|
|
|
//~^ ERROR [E0736]
|
|
|
|
pub unsafe extern "C" fn conditional_inline_never() {
|
2024-09-09 05:47:40 -05:00
|
|
|
naked_asm!("");
|
2024-07-17 03:42:24 -05:00
|
|
|
}
|