diff options
Diffstat (limited to 'tests/ui/unsafe/inline_asm.rs')
-rw-r--r-- | tests/ui/unsafe/inline_asm.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/unsafe/inline_asm.rs b/tests/ui/unsafe/inline_asm.rs new file mode 100644 index 000000000..12c7efe4f --- /dev/null +++ b/tests/ui/unsafe/inline_asm.rs @@ -0,0 +1,9 @@ +// revisions: mir thir +// [thir]compile-flags: -Z thir-unsafeck +// needs-asm-support + +use std::arch::asm; + +fn main() { + asm!("nop"); //~ ERROR use of inline assembly is unsafe and requires unsafe function or block +} |