about summary refs log tree commit diff
path: root/src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr')
-rw-r--r--src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr b/src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr
new file mode 100644
index 00000000000..1fd46809f3e
--- /dev/null
+++ b/src/test/ui/llvm-asm/llvm-asm-parse-errors.stderr
@@ -0,0 +1,68 @@
+error: macro requires a string literal as an argument
+  --> $DIR/llvm-asm-parse-errors.rs:4:5
+   |
+LL |     llvm_asm!();
+   |     ^^^^^^^^^^^^ string literal required
+
+error: expected string literal
+  --> $DIR/llvm-asm-parse-errors.rs:5:23
+   |
+LL |     llvm_asm!("nop" : struct);
+   |                       ^^^^^^ not a string literal
+
+error: expected string literal
+  --> $DIR/llvm-asm-parse-errors.rs:6:35
+   |
+LL |     llvm_asm!("mov %eax, $$0x2" : struct);
+   |                                   ^^^^^^ not a string literal
+
+error: expected `(`, found keyword `struct`
+  --> $DIR/llvm-asm-parse-errors.rs:7:44
+   |
+LL |     llvm_asm!("mov %eax, $$0x2" : "={eax}" struct);
+   |                                            ^^^^^^ expected `(`
+
+error: expected expression, found keyword `struct`
+  --> $DIR/llvm-asm-parse-errors.rs:8:44
+   |
+LL |     llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct));
+   |                                            ^^^^^^ expected expression
+
+error: expected string literal
+  --> $DIR/llvm-asm-parse-errors.rs:9:49
+   |
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : struct);
+   |                                                 ^^^^^^ not a string literal
+
+error: expected `(`, found keyword `struct`
+  --> $DIR/llvm-asm-parse-errors.rs:10:56
+   |
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct);
+   |                                                        ^^^^^^ expected `(`
+
+error: expected expression, found keyword `struct`
+  --> $DIR/llvm-asm-parse-errors.rs:11:56
+   |
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct));
+   |                                                        ^^^^^^ expected expression
+
+error: expected string literal
+  --> $DIR/llvm-asm-parse-errors.rs:12:41
+   |
+LL |     llvm_asm!("mov $$0x200, %eax" : : : struct);
+   |                                         ^^^^^^ not a string literal
+
+error: expected string literal
+  --> $DIR/llvm-asm-parse-errors.rs:13:50
+   |
+LL |     llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct);
+   |                                                  ^^^^^^ not a string literal
+
+error: inline assembly must be a string literal
+  --> $DIR/llvm-asm-parse-errors.rs:14:15
+   |
+LL |     llvm_asm!(123);
+   |               ^^^
+
+error: aborting due to 11 previous errors
+