]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/parse-error.stderr
asm: Allow multiple template strings; interpret them as newline-separated
[rust.git] / src / test / ui / asm / parse-error.stderr
1 error: requires at least a template string argument
2   --> $DIR/parse-error.rs:9:9
3    |
4 LL |         asm!();
5    |         ^^^^^^^
6
7 error: asm template must be a string literal
8   --> $DIR/parse-error.rs:11:14
9    |
10 LL |         asm!(foo);
11    |              ^^^
12
13 error: expected token: `,`
14   --> $DIR/parse-error.rs:13:19
15    |
16 LL |         asm!("{}" foo);
17    |                   ^^^ expected `,`
18
19 error: expected operand, options, or additional template string
20   --> $DIR/parse-error.rs:15:20
21    |
22 LL |         asm!("{}", foo);
23    |                    ^^^ expected operand, options, or additional template string
24
25 error: expected `(`, found `foo`
26   --> $DIR/parse-error.rs:17:23
27    |
28 LL |         asm!("{}", in foo);
29    |                       ^^^ expected `(`
30
31 error: expected `)`, found `foo`
32   --> $DIR/parse-error.rs:19:27
33    |
34 LL |         asm!("{}", in(reg foo));
35    |                           ^^^ expected `)`
36
37 error: expected expression, found end of macro arguments
38   --> $DIR/parse-error.rs:21:27
39    |
40 LL |         asm!("{}", in(reg));
41    |                           ^ expected expression
42
43 error: expected register class or explicit register
44   --> $DIR/parse-error.rs:23:26
45    |
46 LL |         asm!("{}", inout(=) foo => bar);
47    |                          ^
48
49 error: expected expression, found end of macro arguments
50   --> $DIR/parse-error.rs:25:37
51    |
52 LL |         asm!("{}", inout(reg) foo =>);
53    |                                     ^ expected expression
54
55 error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
56   --> $DIR/parse-error.rs:27:32
57    |
58 LL |         asm!("{}", in(reg) foo => bar);
59    |                                ^^ expected one of 7 possible tokens
60
61 error: argument to `sym` must be a path expression
62   --> $DIR/parse-error.rs:29:24
63    |
64 LL |         asm!("{}", sym foo + bar);
65    |                        ^^^^^^^^^
66
67 error: expected one of `)`, `att_syntax`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, or `readonly`, found `foo`
68   --> $DIR/parse-error.rs:31:26
69    |
70 LL |         asm!("", options(foo));
71    |                          ^^^ expected one of 8 possible tokens
72
73 error: expected one of `)` or `,`, found `foo`
74   --> $DIR/parse-error.rs:33:32
75    |
76 LL |         asm!("", options(nomem foo));
77    |                                ^^^ expected one of `)` or `,`
78
79 error: expected one of `)`, `att_syntax`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, or `readonly`, found `foo`
80   --> $DIR/parse-error.rs:35:33
81    |
82 LL |         asm!("", options(nomem, foo));
83    |                                 ^^^ expected one of 8 possible tokens
84
85 error: asm options cannot be specified multiple times
86   --> $DIR/parse-error.rs:37:29
87    |
88 LL |         asm!("", options(), options());
89    |                  ---------  ^^^^^^^^^ duplicate options
90    |                  |
91    |                  previously here
92
93 error: asm options cannot be specified multiple times
94   --> $DIR/parse-error.rs:39:29
95    |
96 LL |         asm!("", options(), options(), options());
97    |                  ---------  ^^^^^^^^^ duplicate options
98    |                  |
99    |                  previously here
100
101 error: asm options cannot be specified multiple times
102   --> $DIR/parse-error.rs:39:40
103    |
104 LL |         asm!("", options(), options(), options());
105    |                  ---------             ^^^^^^^^^ duplicate options
106    |                  |
107    |                  previously here
108
109 error: arguments are not allowed after options
110   --> $DIR/parse-error.rs:42:31
111    |
112 LL |         asm!("{}", options(), const foo);
113    |                    ---------  ^^^^^^^^^ argument
114    |                    |
115    |                    previous options
116
117 error: duplicate argument named `a`
118   --> $DIR/parse-error.rs:44:36
119    |
120 LL |         asm!("{a}", a = const foo, a = const bar);
121    |                     -------------  ^^^^^^^^^^^^^ duplicate argument
122    |                     |
123    |                     previously here
124
125 error: argument never used
126   --> $DIR/parse-error.rs:44:36
127    |
128 LL |         asm!("{a}", a = const foo, a = const bar);
129    |                                    ^^^^^^^^^^^^^ argument never used
130    |
131    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
132
133 error: explicit register arguments cannot have names
134   --> $DIR/parse-error.rs:47:18
135    |
136 LL |         asm!("", a = in("eax") foo);
137    |                  ^^^^^^^^^^^^^^^^^
138
139 error: named arguments cannot follow explicit register arguments
140   --> $DIR/parse-error.rs:49:36
141    |
142 LL |         asm!("{a}", in("eax") foo, a = const bar);
143    |                     -------------  ^^^^^^^^^^^^^ named argument
144    |                     |
145    |                     explicit register argument
146
147 error: named arguments cannot follow explicit register arguments
148   --> $DIR/parse-error.rs:51:36
149    |
150 LL |         asm!("{a}", in("eax") foo, a = const bar);
151    |                     -------------  ^^^^^^^^^^^^^ named argument
152    |                     |
153    |                     explicit register argument
154
155 error: positional arguments cannot follow named arguments or explicit register arguments
156   --> $DIR/parse-error.rs:53:36
157    |
158 LL |         asm!("{1}", in("eax") foo, const bar);
159    |                     -------------  ^^^^^^^^^ positional argument
160    |                     |
161    |                     explicit register argument
162
163 error: expected one of `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
164   --> $DIR/parse-error.rs:55:29
165    |
166 LL |         asm!("", options(), "");
167    |                             ^^ expected one of 8 possible tokens
168
169 error: expected one of `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
170   --> $DIR/parse-error.rs:57:33
171    |
172 LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);
173    |                                 ^^^^ expected one of 8 possible tokens
174
175 error: asm template must be a string literal
176   --> $DIR/parse-error.rs:59:14
177    |
178 LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
179    |              ^^^^^^^^^^^^^^^^^^^^
180    |
181    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
182
183 error: asm template must be a string literal
184   --> $DIR/parse-error.rs:61:21
185    |
186 LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
187    |                     ^^^^^^^^^^^^^^^^^^^^
188    |
189    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
190
191 error: aborting due to 28 previous errors
192