]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | error: requires at least a template string argument |
2 | --> $DIR/parse-error.rs:9:9 | |
3 | | | |
4 | LL | asm!(); | |
c295e0f8 | 5 | | ^^^^^^ |
f9f354fc XL |
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 | ||
94222f64 | 19 | error: expected operand, clobber_abi, options, or additional template string |
f9f354fc XL |
20 | --> $DIR/parse-error.rs:15:20 |
21 | | | |
22 | LL | asm!("{}", foo); | |
94222f64 | 23 | | ^^^ expected operand, clobber_abi, options, or additional template string |
f9f354fc XL |
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 | ||
136023e0 | 67 | error: expected one of `)`, `att_syntax`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` |
f9f354fc XL |
68 | --> $DIR/parse-error.rs:31:26 |
69 | | | |
70 | LL | asm!("", options(foo)); | |
136023e0 | 71 | | ^^^ expected one of 9 possible tokens |
f9f354fc XL |
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 | ||
136023e0 | 79 | error: expected one of `)`, `att_syntax`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` |
f9f354fc XL |
80 | --> $DIR/parse-error.rs:35:33 |
81 | | | |
82 | LL | asm!("", options(nomem, foo)); | |
136023e0 | 83 | | ^^^ expected one of 9 possible tokens |
f9f354fc | 84 | |
f9f354fc | 85 | error: arguments are not allowed after options |
f035d41b | 86 | --> $DIR/parse-error.rs:37:31 |
f9f354fc XL |
87 | | |
88 | LL | asm!("{}", options(), const foo); | |
89 | | --------- ^^^^^^^^^ argument | |
90 | | | | |
91 | | previous options | |
92 | ||
3c0e092e | 93 | error: at least one abi must be provided as an argument to `clobber_abi` |
94222f64 XL |
94 | --> $DIR/parse-error.rs:40:30 |
95 | | | |
3c0e092e XL |
96 | LL | asm!("", clobber_abi()); |
97 | | ^ | |
98 | ||
99 | error: expected string literal | |
100 | --> $DIR/parse-error.rs:42:30 | |
101 | | | |
94222f64 XL |
102 | LL | asm!("", clobber_abi(foo)); |
103 | | ^^^ not a string literal | |
104 | ||
3c0e092e XL |
105 | error: expected one of `)` or `,`, found `foo` |
106 | --> $DIR/parse-error.rs:44:34 | |
94222f64 XL |
107 | | |
108 | LL | asm!("", clobber_abi("C" foo)); | |
3c0e092e | 109 | | ^^^ expected one of `)` or `,` |
94222f64 | 110 | |
3c0e092e XL |
111 | error: expected string literal |
112 | --> $DIR/parse-error.rs:46:35 | |
94222f64 XL |
113 | | |
114 | LL | asm!("", clobber_abi("C", foo)); | |
3c0e092e | 115 | | ^^^ not a string literal |
94222f64 XL |
116 | |
117 | error: arguments are not allowed after clobber_abi | |
3c0e092e | 118 | --> $DIR/parse-error.rs:48:38 |
94222f64 XL |
119 | | |
120 | LL | asm!("{}", clobber_abi("C"), const foo); | |
121 | | ---------------- ^^^^^^^^^ argument | |
122 | | | | |
123 | | clobber_abi | |
124 | ||
125 | error: clobber_abi is not allowed after options | |
3c0e092e | 126 | --> $DIR/parse-error.rs:51:29 |
94222f64 XL |
127 | | |
128 | LL | asm!("", options(), clobber_abi("C")); | |
129 | | --------- ^^^^^^^^^^^^^^^^ | |
130 | | | | |
131 | | options | |
132 | ||
133 | error: clobber_abi is not allowed after options | |
3c0e092e | 134 | --> $DIR/parse-error.rs:53:31 |
94222f64 XL |
135 | | |
136 | LL | asm!("{}", options(), clobber_abi("C"), const foo); | |
137 | | --------- ^^^^^^^^^^^^^^^^ | |
138 | | | | |
139 | | options | |
140 | ||
f9f354fc | 141 | error: duplicate argument named `a` |
94222f64 | 142 | --> $DIR/parse-error.rs:55:36 |
f9f354fc XL |
143 | | |
144 | LL | asm!("{a}", a = const foo, a = const bar); | |
145 | | ------------- ^^^^^^^^^^^^^ duplicate argument | |
146 | | | | |
147 | | previously here | |
148 | ||
149 | error: argument never used | |
94222f64 | 150 | --> $DIR/parse-error.rs:55:36 |
f9f354fc XL |
151 | | |
152 | LL | asm!("{a}", a = const foo, a = const bar); | |
153 | | ^^^^^^^^^^^^^ argument never used | |
f035d41b XL |
154 | | |
155 | = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"` | |
f9f354fc XL |
156 | |
157 | error: explicit register arguments cannot have names | |
94222f64 | 158 | --> $DIR/parse-error.rs:60:18 |
f9f354fc XL |
159 | | |
160 | LL | asm!("", a = in("eax") foo); | |
161 | | ^^^^^^^^^^^^^^^^^ | |
162 | ||
163 | error: named arguments cannot follow explicit register arguments | |
94222f64 | 164 | --> $DIR/parse-error.rs:62:36 |
f9f354fc XL |
165 | | |
166 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
167 | | ------------- ^^^^^^^^^^^^^ named argument | |
168 | | | | |
169 | | explicit register argument | |
170 | ||
171 | error: named arguments cannot follow explicit register arguments | |
94222f64 | 172 | --> $DIR/parse-error.rs:65:36 |
f9f354fc XL |
173 | | |
174 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
175 | | ------------- ^^^^^^^^^^^^^ named argument | |
176 | | | | |
177 | | explicit register argument | |
178 | ||
179 | error: positional arguments cannot follow named arguments or explicit register arguments | |
94222f64 | 180 | --> $DIR/parse-error.rs:68:36 |
f9f354fc XL |
181 | | |
182 | LL | asm!("{1}", in("eax") foo, const bar); | |
183 | | ------------- ^^^^^^^^^ positional argument | |
184 | | | | |
185 | | explicit register argument | |
186 | ||
94222f64 XL |
187 | error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""` |
188 | --> $DIR/parse-error.rs:71:29 | |
f035d41b XL |
189 | | |
190 | LL | asm!("", options(), ""); | |
94222f64 | 191 | | ^^ expected one of 9 possible tokens |
f035d41b | 192 | |
94222f64 XL |
193 | error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"` |
194 | --> $DIR/parse-error.rs:73:33 | |
f035d41b XL |
195 | | |
196 | LL | asm!("{}", in(reg) foo, "{}", out(reg) foo); | |
94222f64 | 197 | | ^^^^ expected one of 9 possible tokens |
f035d41b XL |
198 | |
199 | error: asm template must be a string literal | |
94222f64 | 200 | --> $DIR/parse-error.rs:75:14 |
f035d41b XL |
201 | | |
202 | LL | asm!(format!("{{{}}}", 0), in(reg) foo); | |
203 | | ^^^^^^^^^^^^^^^^^^^^ | |
204 | | | |
17df50a5 | 205 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) |
f035d41b XL |
206 | |
207 | error: asm template must be a string literal | |
94222f64 | 208 | --> $DIR/parse-error.rs:77:21 |
f035d41b XL |
209 | | |
210 | LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar); | |
211 | | ^^^^^^^^^^^^^^^^^^^^ | |
212 | | | |
17df50a5 XL |
213 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) |
214 | ||
c295e0f8 XL |
215 | error: _ cannot be used for input operands |
216 | --> $DIR/parse-error.rs:79:28 | |
217 | | | |
218 | LL | asm!("{}", in(reg) _); | |
219 | | ^ | |
220 | ||
221 | error: _ cannot be used for input operands | |
222 | --> $DIR/parse-error.rs:81:31 | |
223 | | | |
224 | LL | asm!("{}", inout(reg) _); | |
225 | | ^ | |
226 | ||
227 | error: _ cannot be used for input operands | |
228 | --> $DIR/parse-error.rs:83:35 | |
229 | | | |
230 | LL | asm!("{}", inlateout(reg) _); | |
231 | | ^ | |
232 | ||
17df50a5 | 233 | error: requires at least a template string argument |
c295e0f8 | 234 | --> $DIR/parse-error.rs:90:1 |
17df50a5 XL |
235 | | |
236 | LL | global_asm!(); | |
c295e0f8 | 237 | | ^^^^^^^^^^^^^ |
17df50a5 XL |
238 | |
239 | error: asm template must be a string literal | |
c295e0f8 | 240 | --> $DIR/parse-error.rs:92:13 |
17df50a5 XL |
241 | | |
242 | LL | global_asm!(FOO); | |
243 | | ^^^ | |
244 | ||
245 | error: expected token: `,` | |
c295e0f8 | 246 | --> $DIR/parse-error.rs:94:18 |
17df50a5 XL |
247 | | |
248 | LL | global_asm!("{}" FOO); | |
249 | | ^^^ expected `,` | |
250 | ||
251 | error: expected operand, options, or additional template string | |
c295e0f8 | 252 | --> $DIR/parse-error.rs:96:19 |
17df50a5 XL |
253 | | |
254 | LL | global_asm!("{}", FOO); | |
255 | | ^^^ expected operand, options, or additional template string | |
256 | ||
257 | error: expected expression, found end of macro arguments | |
c295e0f8 | 258 | --> $DIR/parse-error.rs:98:24 |
17df50a5 XL |
259 | | |
260 | LL | global_asm!("{}", const); | |
261 | | ^ expected expression | |
262 | ||
263 | error: expected one of `,`, `.`, `?`, or an operator, found `FOO` | |
c295e0f8 | 264 | --> $DIR/parse-error.rs:100:30 |
17df50a5 XL |
265 | | |
266 | LL | global_asm!("{}", const(reg) FOO); | |
267 | | ^^^ expected one of `,`, `.`, `?`, or an operator | |
268 | ||
136023e0 | 269 | error: expected one of `)`, `att_syntax`, or `raw`, found `FOO` |
c295e0f8 | 270 | --> $DIR/parse-error.rs:102:25 |
17df50a5 XL |
271 | | |
272 | LL | global_asm!("", options(FOO)); | |
136023e0 | 273 | | ^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 | 274 | |
136023e0 | 275 | error: expected one of `)`, `att_syntax`, or `raw`, found `nomem` |
c295e0f8 | 276 | --> $DIR/parse-error.rs:104:25 |
17df50a5 XL |
277 | | |
278 | LL | global_asm!("", options(nomem FOO)); | |
136023e0 | 279 | | ^^^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 | 280 | |
136023e0 | 281 | error: expected one of `)`, `att_syntax`, or `raw`, found `nomem` |
c295e0f8 | 282 | --> $DIR/parse-error.rs:106:25 |
17df50a5 XL |
283 | | |
284 | LL | global_asm!("", options(nomem, FOO)); | |
136023e0 | 285 | | ^^^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 XL |
286 | |
287 | error: arguments are not allowed after options | |
c295e0f8 | 288 | --> $DIR/parse-error.rs:108:30 |
17df50a5 XL |
289 | | |
290 | LL | global_asm!("{}", options(), const FOO); | |
291 | | --------- ^^^^^^^^^ argument | |
292 | | | | |
293 | | previous options | |
294 | ||
94222f64 | 295 | error: expected string literal |
c295e0f8 | 296 | --> $DIR/parse-error.rs:110:29 |
94222f64 XL |
297 | | |
298 | LL | global_asm!("", clobber_abi(FOO)); | |
299 | | ^^^ not a string literal | |
300 | ||
3c0e092e | 301 | error: expected one of `)` or `,`, found `FOO` |
c295e0f8 | 302 | --> $DIR/parse-error.rs:112:33 |
94222f64 XL |
303 | | |
304 | LL | global_asm!("", clobber_abi("C" FOO)); | |
3c0e092e | 305 | | ^^^ expected one of `)` or `,` |
94222f64 | 306 | |
3c0e092e XL |
307 | error: expected string literal |
308 | --> $DIR/parse-error.rs:114:34 | |
94222f64 XL |
309 | | |
310 | LL | global_asm!("", clobber_abi("C", FOO)); | |
3c0e092e | 311 | | ^^^ not a string literal |
94222f64 XL |
312 | |
313 | error: arguments are not allowed after clobber_abi | |
c295e0f8 | 314 | --> $DIR/parse-error.rs:116:37 |
94222f64 XL |
315 | | |
316 | LL | global_asm!("{}", clobber_abi("C"), const FOO); | |
317 | | ---------------- ^^^^^^^^^ argument | |
318 | | | | |
319 | | clobber_abi | |
320 | ||
321 | error: `clobber_abi` cannot be used with `global_asm!` | |
c295e0f8 | 322 | --> $DIR/parse-error.rs:116:19 |
94222f64 XL |
323 | | |
324 | LL | global_asm!("{}", clobber_abi("C"), const FOO); | |
325 | | ^^^^^^^^^^^^^^^^ | |
326 | ||
327 | error: clobber_abi is not allowed after options | |
c295e0f8 | 328 | --> $DIR/parse-error.rs:119:28 |
94222f64 XL |
329 | | |
330 | LL | global_asm!("", options(), clobber_abi("C")); | |
331 | | --------- ^^^^^^^^^^^^^^^^ | |
332 | | | | |
333 | | options | |
334 | ||
335 | error: clobber_abi is not allowed after options | |
c295e0f8 | 336 | --> $DIR/parse-error.rs:121:30 |
94222f64 XL |
337 | | |
338 | LL | global_asm!("{}", options(), clobber_abi("C"), const FOO); | |
339 | | --------- ^^^^^^^^^^^^^^^^ | |
340 | | | | |
341 | | options | |
342 | ||
3c0e092e XL |
343 | error: `clobber_abi` cannot be used with `global_asm!` |
344 | --> $DIR/parse-error.rs:123:17 | |
94222f64 XL |
345 | | |
346 | LL | global_asm!("", clobber_abi("C"), clobber_abi("C")); | |
3c0e092e | 347 | | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ |
94222f64 | 348 | |
17df50a5 | 349 | error: duplicate argument named `a` |
c295e0f8 | 350 | --> $DIR/parse-error.rs:125:35 |
17df50a5 XL |
351 | | |
352 | LL | global_asm!("{a}", a = const FOO, a = const BAR); | |
353 | | ------------- ^^^^^^^^^^^^^ duplicate argument | |
354 | | | | |
355 | | previously here | |
356 | ||
357 | error: argument never used | |
c295e0f8 | 358 | --> $DIR/parse-error.rs:125:35 |
17df50a5 XL |
359 | | |
360 | LL | global_asm!("{a}", a = const FOO, a = const BAR); | |
361 | | ^^^^^^^^^^^^^ argument never used | |
362 | | | |
363 | = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"` | |
364 | ||
94222f64 | 365 | error: expected one of `clobber_abi`, `const`, or `options`, found `""` |
c295e0f8 | 366 | --> $DIR/parse-error.rs:128:28 |
17df50a5 XL |
367 | | |
368 | LL | global_asm!("", options(), ""); | |
94222f64 | 369 | | ^^ expected one of `clobber_abi`, `const`, or `options` |
17df50a5 | 370 | |
94222f64 | 371 | error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"` |
c295e0f8 | 372 | --> $DIR/parse-error.rs:130:30 |
17df50a5 XL |
373 | | |
374 | LL | global_asm!("{}", const FOO, "{}", const FOO); | |
94222f64 | 375 | | ^^^^ expected one of `clobber_abi`, `const`, or `options` |
17df50a5 XL |
376 | |
377 | error: asm template must be a string literal | |
c295e0f8 | 378 | --> $DIR/parse-error.rs:132:13 |
17df50a5 XL |
379 | | |
380 | LL | global_asm!(format!("{{{}}}", 0), const FOO); | |
381 | | ^^^^^^^^^^^^^^^^^^^^ | |
382 | | | |
383 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) | |
384 | ||
385 | error: asm template must be a string literal | |
c295e0f8 | 386 | --> $DIR/parse-error.rs:134:20 |
17df50a5 XL |
387 | | |
388 | LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR); | |
389 | | ^^^^^^^^^^^^^^^^^^^^ | |
390 | | | |
391 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) | |
f035d41b | 392 | |
cdc7bbd5 XL |
393 | error[E0435]: attempt to use a non-constant value in a constant |
394 | --> $DIR/parse-error.rs:37:37 | |
395 | | | |
396 | LL | let mut foo = 0; | |
397 | | ---------- help: consider using `const` instead of `let`: `const foo` | |
398 | ... | |
399 | LL | asm!("{}", options(), const foo); | |
400 | | ^^^ non-constant value | |
401 | ||
402 | error[E0435]: attempt to use a non-constant value in a constant | |
3c0e092e | 403 | --> $DIR/parse-error.rs:48:44 |
94222f64 XL |
404 | | |
405 | LL | let mut foo = 0; | |
406 | | ---------- help: consider using `const` instead of `let`: `const foo` | |
407 | ... | |
408 | LL | asm!("{}", clobber_abi("C"), const foo); | |
409 | | ^^^ non-constant value | |
410 | ||
411 | error[E0435]: attempt to use a non-constant value in a constant | |
412 | --> $DIR/parse-error.rs:55:31 | |
cdc7bbd5 XL |
413 | | |
414 | LL | let mut foo = 0; | |
415 | | ---------- help: consider using `const` instead of `let`: `const foo` | |
416 | ... | |
417 | LL | asm!("{a}", a = const foo, a = const bar); | |
418 | | ^^^ non-constant value | |
419 | ||
420 | error[E0435]: attempt to use a non-constant value in a constant | |
94222f64 | 421 | --> $DIR/parse-error.rs:55:46 |
cdc7bbd5 XL |
422 | | |
423 | LL | let mut bar = 0; | |
424 | | ---------- help: consider using `const` instead of `let`: `const bar` | |
425 | ... | |
426 | LL | asm!("{a}", a = const foo, a = const bar); | |
427 | | ^^^ non-constant value | |
428 | ||
429 | error[E0435]: attempt to use a non-constant value in a constant | |
94222f64 | 430 | --> $DIR/parse-error.rs:62:46 |
cdc7bbd5 XL |
431 | | |
432 | LL | let mut bar = 0; | |
433 | | ---------- help: consider using `const` instead of `let`: `const bar` | |
434 | ... | |
435 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
436 | | ^^^ non-constant value | |
437 | ||
438 | error[E0435]: attempt to use a non-constant value in a constant | |
94222f64 | 439 | --> $DIR/parse-error.rs:65:46 |
cdc7bbd5 XL |
440 | | |
441 | LL | let mut bar = 0; | |
442 | | ---------- help: consider using `const` instead of `let`: `const bar` | |
443 | ... | |
444 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
445 | | ^^^ non-constant value | |
446 | ||
447 | error[E0435]: attempt to use a non-constant value in a constant | |
94222f64 | 448 | --> $DIR/parse-error.rs:68:42 |
cdc7bbd5 XL |
449 | | |
450 | LL | let mut bar = 0; | |
451 | | ---------- help: consider using `const` instead of `let`: `const bar` | |
452 | ... | |
453 | LL | asm!("{1}", in("eax") foo, const bar); | |
454 | | ^^^ non-constant value | |
455 | ||
c295e0f8 | 456 | error: aborting due to 66 previous errors |
f9f354fc | 457 | |
cdc7bbd5 | 458 | For more information about this error, try `rustc --explain E0435`. |