summaryrefslogtreecommitdiffstats
path: root/src/test/ui/asm/aarch64/parse-error.stderr
blob: 804966b06ba7dfdf1f19b368bc5c85f4fb61dcb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
error: requires at least a template string argument
  --> $DIR/parse-error.rs:11:9
   |
LL |         asm!();
   |         ^^^^^^

error: asm template must be a string literal
  --> $DIR/parse-error.rs:13:14
   |
LL |         asm!(foo);
   |              ^^^

error: expected token: `,`
  --> $DIR/parse-error.rs:15:19
   |
LL |         asm!("{}" foo);
   |                   ^^^ expected `,`

error: expected operand, clobber_abi, options, or additional template string
  --> $DIR/parse-error.rs:17:20
   |
LL |         asm!("{}", foo);
   |                    ^^^ expected operand, clobber_abi, options, or additional template string

error: expected `(`, found `foo`
  --> $DIR/parse-error.rs:19:23
   |
LL |         asm!("{}", in foo);
   |                       ^^^ expected `(`

error: expected `)`, found `foo`
  --> $DIR/parse-error.rs:21:27
   |
LL |         asm!("{}", in(reg foo));
   |                           ^^^ expected `)`

error: expected expression, found end of macro arguments
  --> $DIR/parse-error.rs:23:27
   |
LL |         asm!("{}", in(reg));
   |                           ^ expected expression

error: expected register class or explicit register
  --> $DIR/parse-error.rs:25:26
   |
LL |         asm!("{}", inout(=) foo => bar);
   |                          ^

error: expected expression, found end of macro arguments
  --> $DIR/parse-error.rs:27:37
   |
LL |         asm!("{}", inout(reg) foo =>);
   |                                     ^ expected expression

error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
  --> $DIR/parse-error.rs:29:32
   |
LL |         asm!("{}", in(reg) foo => bar);
   |                                ^^ expected one of 7 possible tokens

error: expected a path for argument to `sym`
  --> $DIR/parse-error.rs:31:24
   |
LL |         asm!("{}", sym foo + bar);
   |                        ^^^^^^^^^

error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
  --> $DIR/parse-error.rs:33:26
   |
LL |         asm!("", options(foo));
   |                          ^^^ expected one of 10 possible tokens

error: expected one of `)` or `,`, found `foo`
  --> $DIR/parse-error.rs:35:32
   |
LL |         asm!("", options(nomem foo));
   |                                ^^^ expected one of `)` or `,`

error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
  --> $DIR/parse-error.rs:37:33
   |
LL |         asm!("", options(nomem, foo));
   |                                 ^^^ expected one of 10 possible tokens

error: arguments are not allowed after options
  --> $DIR/parse-error.rs:39:31
   |
LL |         asm!("{}", options(), const foo);
   |                    ---------  ^^^^^^^^^ argument
   |                    |
   |                    previous options

error: expected string literal
  --> $DIR/parse-error.rs:42:30
   |
LL |         asm!("", clobber_abi(foo));
   |                              ^^^ not a string literal

error: expected one of `)` or `,`, found `foo`
  --> $DIR/parse-error.rs:44:34
   |
LL |         asm!("", clobber_abi("C" foo));
   |                                  ^^^ expected one of `)` or `,`

error: expected string literal
  --> $DIR/parse-error.rs:46:35
   |
LL |         asm!("", clobber_abi("C", foo));
   |                                   ^^^ not a string literal

error: arguments are not allowed after clobber_abi
  --> $DIR/parse-error.rs:48:38
   |
LL |         asm!("{}", clobber_abi("C"), const foo);
   |                    ----------------  ^^^^^^^^^ argument
   |                    |
   |                    clobber_abi

error: clobber_abi is not allowed after options
  --> $DIR/parse-error.rs:51:29
   |
LL |         asm!("", options(), clobber_abi("C"));
   |                  ---------  ^^^^^^^^^^^^^^^^
   |                  |
   |                  options

error: clobber_abi is not allowed after options
  --> $DIR/parse-error.rs:53:31
   |
LL |         asm!("{}", options(), clobber_abi("C"), const foo);
   |                    ---------  ^^^^^^^^^^^^^^^^
   |                    |
   |                    options

error: duplicate argument named `a`
  --> $DIR/parse-error.rs:55:36
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                     -------------  ^^^^^^^^^^^^^ duplicate argument
   |                     |
   |                     previously here

error: argument never used
  --> $DIR/parse-error.rs:55:36
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                    ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`

error: explicit register arguments cannot have names
  --> $DIR/parse-error.rs:60:18
   |
LL |         asm!("", a = in("x0") foo);
   |                  ^^^^^^^^^^^^^^^^

error: named arguments cannot follow explicit register arguments
  --> $DIR/parse-error.rs:62:35
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                     ------------  ^^^^^^^^^^^^^ named argument
   |                     |
   |                     explicit register argument

error: named arguments cannot follow explicit register arguments
  --> $DIR/parse-error.rs:65:35
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                     ------------  ^^^^^^^^^^^^^ named argument
   |                     |
   |                     explicit register argument

error: positional arguments cannot follow named arguments or explicit register arguments
  --> $DIR/parse-error.rs:68:35
   |
LL |         asm!("{1}", in("x0") foo, const bar);
   |                     ------------  ^^^^^^^^^ positional argument
   |                     |
   |                     explicit register argument

error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
  --> $DIR/parse-error.rs:71:29
   |
LL |         asm!("", options(), "");
   |                             ^^ expected one of 9 possible tokens

error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
  --> $DIR/parse-error.rs:73:33
   |
LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);
   |                                 ^^^^ expected one of 9 possible tokens

error: asm template must be a string literal
  --> $DIR/parse-error.rs:75:14
   |
LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
   |              ^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
  --> $DIR/parse-error.rs:77:21
   |
LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
   |                     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: _ cannot be used for input operands
  --> $DIR/parse-error.rs:79:28
   |
LL |         asm!("{}", in(reg) _);
   |                            ^

error: _ cannot be used for input operands
  --> $DIR/parse-error.rs:81:31
   |
LL |         asm!("{}", inout(reg) _);
   |                               ^

error: _ cannot be used for input operands
  --> $DIR/parse-error.rs:83:35
   |
LL |         asm!("{}", inlateout(reg) _);
   |                                   ^

error: requires at least a template string argument
  --> $DIR/parse-error.rs:90:1
   |
LL | global_asm!();
   | ^^^^^^^^^^^^^

error: asm template must be a string literal
  --> $DIR/parse-error.rs:92:13
   |
LL | global_asm!(FOO);
   |             ^^^

error: expected token: `,`
  --> $DIR/parse-error.rs:94:18
   |
LL | global_asm!("{}" FOO);
   |                  ^^^ expected `,`

error: expected operand, options, or additional template string
  --> $DIR/parse-error.rs:96:19
   |
LL | global_asm!("{}", FOO);
   |                   ^^^ expected operand, options, or additional template string

error: expected expression, found end of macro arguments
  --> $DIR/parse-error.rs:98:24
   |
LL | global_asm!("{}", const);
   |                        ^ expected expression

error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
  --> $DIR/parse-error.rs:100:30
   |
LL | global_asm!("{}", const(reg) FOO);
   |                              ^^^ expected one of `,`, `.`, `?`, or an operator

error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
  --> $DIR/parse-error.rs:102:25
   |
LL | global_asm!("", options(FOO));
   |                         ^^^ expected one of `)`, `att_syntax`, or `raw`

error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
  --> $DIR/parse-error.rs:104:25
   |
LL | global_asm!("", options(nomem FOO));
   |                         ^^^^^ expected one of `)`, `att_syntax`, or `raw`

error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
  --> $DIR/parse-error.rs:106:25
   |
LL | global_asm!("", options(nomem, FOO));
   |                         ^^^^^ expected one of `)`, `att_syntax`, or `raw`

error: arguments are not allowed after options
  --> $DIR/parse-error.rs:108:30
   |
LL | global_asm!("{}", options(), const FOO);
   |                   ---------  ^^^^^^^^^ argument
   |                   |
   |                   previous options

error: expected string literal
  --> $DIR/parse-error.rs:110:29
   |
LL | global_asm!("", clobber_abi(FOO));
   |                             ^^^ not a string literal

error: expected one of `)` or `,`, found `FOO`
  --> $DIR/parse-error.rs:112:33
   |
LL | global_asm!("", clobber_abi("C" FOO));
   |                                 ^^^ expected one of `)` or `,`

error: expected string literal
  --> $DIR/parse-error.rs:114:34
   |
LL | global_asm!("", clobber_abi("C", FOO));
   |                                  ^^^ not a string literal

error: arguments are not allowed after clobber_abi
  --> $DIR/parse-error.rs:116:37
   |
LL | global_asm!("{}", clobber_abi("C"), const FOO);
   |                   ----------------  ^^^^^^^^^ argument
   |                   |
   |                   clobber_abi

error: `clobber_abi` cannot be used with `global_asm!`
  --> $DIR/parse-error.rs:116:19
   |
LL | global_asm!("{}", clobber_abi("C"), const FOO);
   |                   ^^^^^^^^^^^^^^^^

error: clobber_abi is not allowed after options
  --> $DIR/parse-error.rs:119:28
   |
LL | global_asm!("", options(), clobber_abi("C"));
   |                 ---------  ^^^^^^^^^^^^^^^^
   |                 |
   |                 options

error: clobber_abi is not allowed after options
  --> $DIR/parse-error.rs:121:30
   |
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
   |                   ---------  ^^^^^^^^^^^^^^^^
   |                   |
   |                   options

error: duplicate argument named `a`
  --> $DIR/parse-error.rs:123:35
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                    -------------  ^^^^^^^^^^^^^ duplicate argument
   |                    |
   |                    previously here

error: argument never used
  --> $DIR/parse-error.rs:123:35
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                                   ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
  --> $DIR/parse-error.rs:126:28
   |
LL | global_asm!("", options(), "");
   |                            ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
  --> $DIR/parse-error.rs:128:30
   |
LL | global_asm!("{}", const FOO, "{}", const FOO);
   |                              ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`

error: asm template must be a string literal
  --> $DIR/parse-error.rs:130:13
   |
LL | global_asm!(format!("{{{}}}", 0), const FOO);
   |             ^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
  --> $DIR/parse-error.rs:132:20
   |
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
   |                    ^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:39:37
   |
LL |     let mut foo = 0;
   |     ----------- help: consider using `const` instead of `let`: `const foo`
...
LL |         asm!("{}", options(), const foo);
   |                                     ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:48:44
   |
LL |     let mut foo = 0;
   |     ----------- help: consider using `const` instead of `let`: `const foo`
...
LL |         asm!("{}", clobber_abi("C"), const foo);
   |                                            ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:55:31
   |
LL |     let mut foo = 0;
   |     ----------- help: consider using `const` instead of `let`: `const foo`
...
LL |         asm!("{a}", a = const foo, a = const bar);
   |                               ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:55:46
   |
LL |     let mut bar = 0;
   |     ----------- help: consider using `const` instead of `let`: `const bar`
...
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                              ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:62:45
   |
LL |     let mut bar = 0;
   |     ----------- help: consider using `const` instead of `let`: `const bar`
...
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:65:45
   |
LL |     let mut bar = 0;
   |     ----------- help: consider using `const` instead of `let`: `const bar`
...
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
  --> $DIR/parse-error.rs:68:41
   |
LL |     let mut bar = 0;
   |     ----------- help: consider using `const` instead of `let`: `const bar`
...
LL |         asm!("{1}", in("x0") foo, const bar);
   |                                         ^^^ non-constant value

error: aborting due to 64 previous errors

For more information about this error, try `rustc --explain E0435`.