]> git.proxmox.com Git - rustc.git/blob - src/test/ui/asm/parse-error.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.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, 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: requires at least a template string argument
218 --> $DIR/parse-error.rs:84:1
219 |
220 LL | global_asm!();
221 | ^^^^^^^^^^^^^^
222
223 error: asm template must be a string literal
224 --> $DIR/parse-error.rs:86:13
225 |
226 LL | global_asm!(FOO);
227 | ^^^
228
229 error: expected token: `,`
230 --> $DIR/parse-error.rs:88:18
231 |
232 LL | global_asm!("{}" FOO);
233 | ^^^ expected `,`
234
235 error: expected operand, options, or additional template string
236 --> $DIR/parse-error.rs:90:19
237 |
238 LL | global_asm!("{}", FOO);
239 | ^^^ expected operand, options, or additional template string
240
241 error: expected expression, found end of macro arguments
242 --> $DIR/parse-error.rs:92:24
243 |
244 LL | global_asm!("{}", const);
245 | ^ expected expression
246
247 error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
248 --> $DIR/parse-error.rs:94:30
249 |
250 LL | global_asm!("{}", const(reg) FOO);
251 | ^^^ expected one of `,`, `.`, `?`, or an operator
252
253 error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
254 --> $DIR/parse-error.rs:96:25
255 |
256 LL | global_asm!("", options(FOO));
257 | ^^^ expected one of `)`, `att_syntax`, or `raw`
258
259 error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
260 --> $DIR/parse-error.rs:98:25
261 |
262 LL | global_asm!("", options(nomem FOO));
263 | ^^^^^ expected one of `)`, `att_syntax`, or `raw`
264
265 error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
266 --> $DIR/parse-error.rs:100:25
267 |
268 LL | global_asm!("", options(nomem, FOO));
269 | ^^^^^ expected one of `)`, `att_syntax`, or `raw`
270
271 error: arguments are not allowed after options
272 --> $DIR/parse-error.rs:102:30
273 |
274 LL | global_asm!("{}", options(), const FOO);
275 | --------- ^^^^^^^^^ argument
276 | |
277 | previous options
278
279 error: expected string literal
280 --> $DIR/parse-error.rs:104:29
281 |
282 LL | global_asm!("", clobber_abi(FOO));
283 | ^^^ not a string literal
284
285 error: expected `)`, found `FOO`
286 --> $DIR/parse-error.rs:106:33
287 |
288 LL | global_asm!("", clobber_abi("C" FOO));
289 | ^^^ expected `)`
290
291 error: expected `)`, found `,`
292 --> $DIR/parse-error.rs:108:32
293 |
294 LL | global_asm!("", clobber_abi("C", FOO));
295 | ^ expected `)`
296
297 error: arguments are not allowed after clobber_abi
298 --> $DIR/parse-error.rs:110:37
299 |
300 LL | global_asm!("{}", clobber_abi("C"), const FOO);
301 | ---------------- ^^^^^^^^^ argument
302 | |
303 | clobber_abi
304
305 error: `clobber_abi` cannot be used with `global_asm!`
306 --> $DIR/parse-error.rs:110:19
307 |
308 LL | global_asm!("{}", clobber_abi("C"), const FOO);
309 | ^^^^^^^^^^^^^^^^
310
311 error: clobber_abi is not allowed after options
312 --> $DIR/parse-error.rs:113:28
313 |
314 LL | global_asm!("", options(), clobber_abi("C"));
315 | --------- ^^^^^^^^^^^^^^^^
316 | |
317 | options
318
319 error: clobber_abi is not allowed after options
320 --> $DIR/parse-error.rs:115:30
321 |
322 LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
323 | --------- ^^^^^^^^^^^^^^^^
324 | |
325 | options
326
327 error: clobber_abi specified multiple times
328 --> $DIR/parse-error.rs:117:35
329 |
330 LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
331 | ---------------- ^^^^^^^^^^^^^^^^
332 | |
333 | clobber_abi previously specified here
334
335 error: duplicate argument named `a`
336 --> $DIR/parse-error.rs:119:35
337 |
338 LL | global_asm!("{a}", a = const FOO, a = const BAR);
339 | ------------- ^^^^^^^^^^^^^ duplicate argument
340 | |
341 | previously here
342
343 error: argument never used
344 --> $DIR/parse-error.rs:119:35
345 |
346 LL | global_asm!("{a}", a = const FOO, a = const BAR);
347 | ^^^^^^^^^^^^^ argument never used
348 |
349 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
350
351 error: expected one of `clobber_abi`, `const`, or `options`, found `""`
352 --> $DIR/parse-error.rs:122:28
353 |
354 LL | global_asm!("", options(), "");
355 | ^^ expected one of `clobber_abi`, `const`, or `options`
356
357 error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"`
358 --> $DIR/parse-error.rs:124:30
359 |
360 LL | global_asm!("{}", const FOO, "{}", const FOO);
361 | ^^^^ expected one of `clobber_abi`, `const`, or `options`
362
363 error: asm template must be a string literal
364 --> $DIR/parse-error.rs:126:13
365 |
366 LL | global_asm!(format!("{{{}}}", 0), const FOO);
367 | ^^^^^^^^^^^^^^^^^^^^
368 |
369 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
370
371 error: asm template must be a string literal
372 --> $DIR/parse-error.rs:128:20
373 |
374 LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
375 | ^^^^^^^^^^^^^^^^^^^^
376 |
377 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
378
379 error[E0435]: attempt to use a non-constant value in a constant
380 --> $DIR/parse-error.rs:37:37
381 |
382 LL | let mut foo = 0;
383 | ---------- help: consider using `const` instead of `let`: `const foo`
384 ...
385 LL | asm!("{}", options(), const foo);
386 | ^^^ non-constant value
387
388 error[E0435]: attempt to use a non-constant value in a constant
389 --> $DIR/parse-error.rs:46:44
390 |
391 LL | let mut foo = 0;
392 | ---------- help: consider using `const` instead of `let`: `const foo`
393 ...
394 LL | asm!("{}", clobber_abi("C"), const foo);
395 | ^^^ non-constant value
396
397 error[E0435]: attempt to use a non-constant value in a constant
398 --> $DIR/parse-error.rs:55:31
399 |
400 LL | let mut foo = 0;
401 | ---------- help: consider using `const` instead of `let`: `const foo`
402 ...
403 LL | asm!("{a}", a = const foo, a = const bar);
404 | ^^^ non-constant value
405
406 error[E0435]: attempt to use a non-constant value in a constant
407 --> $DIR/parse-error.rs:55:46
408 |
409 LL | let mut bar = 0;
410 | ---------- help: consider using `const` instead of `let`: `const bar`
411 ...
412 LL | asm!("{a}", a = const foo, a = const bar);
413 | ^^^ non-constant value
414
415 error[E0435]: attempt to use a non-constant value in a constant
416 --> $DIR/parse-error.rs:62:46
417 |
418 LL | let mut bar = 0;
419 | ---------- help: consider using `const` instead of `let`: `const bar`
420 ...
421 LL | asm!("{a}", in("eax") 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:65:46
426 |
427 LL | let mut bar = 0;
428 | ---------- help: consider using `const` instead of `let`: `const bar`
429 ...
430 LL | asm!("{a}", in("eax") 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:68:42
435 |
436 LL | let mut bar = 0;
437 | ---------- help: consider using `const` instead of `let`: `const bar`
438 ...
439 LL | asm!("{1}", in("eax") foo, const bar);
440 | ^^^ non-constant value
441
442 error: aborting due to 63 previous errors
443
444 For more information about this error, try `rustc --explain E0435`.