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