1
Fork 0
rust/src/test/ui/unsafe/inline_asm.rs

12 lines
355 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
#![feature(llvm_asm)]
#![feature(asm)]
2021-07-29 19:45:13 +02:00
#![allow(deprecated)] // llvm_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
}