about summary refs log tree commit diff
path: root/tests/ui/asm/tainting-on-error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/asm/tainting-on-error.rs')
-rw-r--r--tests/ui/asm/tainting-on-error.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/asm/tainting-on-error.rs b/tests/ui/asm/tainting-on-error.rs
new file mode 100644
index 00000000000..a8e9af91158
--- /dev/null
+++ b/tests/ui/asm/tainting-on-error.rs
@@ -0,0 +1,13 @@
+//@ needs-asm-support
+
+use std::arch::asm;
+
+fn main() {
+    unsafe {
+        asm!(
+            "/* {} */",
+            sym None::<()>,
+            //~^ ERROR invalid `sym` operand
+        );
+    }
+}