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