c6a166bac2
- merge error codes - use attribute name that is incompatible in error message - add test for conditional incompatible attribute - add `linkage` to the allowlist
39 lines
696 B
Rust
39 lines
696 B
Rust
//@ needs-asm-support
|
|
#![feature(naked_functions)]
|
|
#![crate_type = "lib"]
|
|
|
|
use std::arch::asm;
|
|
|
|
#[naked]
|
|
pub unsafe extern "C" fn inline_none() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
|
|
#[naked]
|
|
#[inline]
|
|
//~^ ERROR [E0736]
|
|
pub unsafe extern "C" fn inline_hint() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
|
|
#[naked]
|
|
#[inline(always)]
|
|
//~^ ERROR [E0736]
|
|
pub unsafe extern "C" fn inline_always() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
|
|
#[naked]
|
|
#[inline(never)]
|
|
//~^ ERROR [E0736]
|
|
pub unsafe extern "C" fn inline_never() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
|
|
#[naked]
|
|
#[cfg_attr(all(), inline(never))]
|
|
//~^ ERROR [E0736]
|
|
pub unsafe extern "C" fn conditional_inline_never() {
|
|
asm!("", options(noreturn));
|
|
}
|