c6a166bac2
- merge error codes - use attribute name that is incompatible in error message - add test for conditional incompatible attribute - add `linkage` to the allowlist
40 lines
632 B
Rust
40 lines
632 B
Rust
//@ needs-asm-support
|
|
//@ compile-flags: --test
|
|
|
|
#![allow(undefined_naked_function_abi)]
|
|
#![feature(naked_functions)]
|
|
#![feature(test)]
|
|
#![crate_type = "lib"]
|
|
|
|
use std::arch::asm;
|
|
|
|
#[test]
|
|
#[naked]
|
|
//~^ ERROR [E0736]
|
|
fn test_naked() {
|
|
unsafe { asm!("", options(noreturn)) };
|
|
}
|
|
|
|
#[should_panic]
|
|
#[test]
|
|
#[naked]
|
|
//~^ ERROR [E0736]
|
|
fn test_naked_should_panic() {
|
|
unsafe { asm!("", options(noreturn)) };
|
|
}
|
|
|
|
#[ignore]
|
|
#[test]
|
|
#[naked]
|
|
//~^ ERROR [E0736]
|
|
fn test_naked_ignore() {
|
|
unsafe { asm!("", options(noreturn)) };
|
|
}
|
|
|
|
#[bench]
|
|
#[naked]
|
|
//~^ ERROR [E0736]
|
|
fn bench_naked() {
|
|
unsafe { asm!("", options(noreturn)) };
|
|
}
|