about summary refs log tree commit diff
path: root/src/test/ui/unsafe/inline_asm.rs
blob: 7c1f86ac0e091dc21a16a6128483ef3df2288d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
// needs-asm-support

#![feature(llvm_asm)]
#![allow(deprecated)] // llvm_asm!

use std::arch::asm;

fn main() {
    asm!("nop"); //~ ERROR use of inline assembly is unsafe and requires unsafe function or block
    llvm_asm!("nop"); //~ ERROR use of inline assembly is unsafe and requires unsafe function or block
}