summaryrefslogtreecommitdiffstats
path: root/src/test/ui/asm/noreturn.rs
blob: 03fa087ae3766c533ce55014cf6db174777d78b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// needs-asm-support
// check-pass

#![feature(never_type)]
#![crate_type = "rlib"]

use std::arch::asm;

pub unsafe fn asm1() {
    let _: () = asm!("");
}

pub unsafe fn asm2() {
    let _: ! = asm!("", options(noreturn));
}

pub unsafe fn asm3() -> ! {
    asm!("", options(noreturn));
}