summaryrefslogtreecommitdiffstats
path: root/tests/ui/asm/naked-functions-ffi.rs
blob: c8bee504d02bb3aa4373e3a9bf63f27c6145c5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// check-pass
// needs-asm-support
#![feature(naked_functions)]
#![crate_type = "lib"]

use std::arch::asm;

#[naked]
pub extern "C" fn naked(p: char) -> u128 {
    //~^ WARN uses type `char`
    //~| WARN uses type `u128`
    unsafe {
        asm!("", options(noreturn));
    }
}