Skip to content

Commit c77cd0a

Browse files
committed
Fix aarch tests
1 parent b6f2700 commit c77cd0a

File tree

2 files changed

+51
-60
lines changed

2 files changed

+51
-60
lines changed

src/test/ui/asm/aarch64/parse-error.rs

-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ fn main() {
5050
//~^ ERROR clobber_abi is not allowed after options
5151
asm!("{}", options(), clobber_abi("C"), const foo);
5252
//~^ ERROR clobber_abi is not allowed after options
53-
asm!("", clobber_abi("C"), clobber_abi("C"));
5453
asm!("{a}", a = const foo, a = const bar);
5554
//~^ ERROR duplicate argument named `a`
5655
//~^^ ERROR argument never used
@@ -119,8 +118,6 @@ global_asm!("", options(), clobber_abi("C"));
119118
//~^ ERROR clobber_abi is not allowed after options
120119
global_asm!("{}", options(), clobber_abi("C"), const FOO);
121120
//~^ ERROR clobber_abi is not allowed after options
122-
global_asm!("", clobber_abi("C"), clobber_abi("C"));
123-
//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
124121
global_asm!("{a}", a = const FOO, a = const BAR);
125122
//~^ ERROR duplicate argument named `a`
126123
//~^^ ERROR argument never used

src/test/ui/asm/aarch64/parse-error.stderr

+51-57
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ error: expected string literal
9696
LL | asm!("", clobber_abi(foo));
9797
| ^^^ not a string literal
9898

99-
error: expected `)`, found `foo`
99+
error: expected one of `)` or `,`, found `foo`
100100
--> $DIR/parse-error.rs:42:34
101101
|
102102
LL | asm!("", clobber_abi("C" foo));
103-
| ^^^ expected `)`
103+
| ^^^ expected one of `)` or `,`
104104

105-
error: expected `)`, found `,`
106-
--> $DIR/parse-error.rs:44:33
105+
error: expected string literal
106+
--> $DIR/parse-error.rs:44:35
107107
|
108108
LL | asm!("", clobber_abi("C", foo));
109-
| ^ expected `)`
109+
| ^^^ not a string literal
110110

111111
error: arguments are not allowed after clobber_abi
112112
--> $DIR/parse-error.rs:46:38
@@ -133,251 +133,245 @@ LL | asm!("{}", options(), clobber_abi("C"), const foo);
133133
| options
134134

135135
error: duplicate argument named `a`
136-
--> $DIR/parse-error.rs:54:36
136+
--> $DIR/parse-error.rs:53:36
137137
|
138138
LL | asm!("{a}", a = const foo, a = const bar);
139139
| ------------- ^^^^^^^^^^^^^ duplicate argument
140140
| |
141141
| previously here
142142

143143
error: argument never used
144-
--> $DIR/parse-error.rs:54:36
144+
--> $DIR/parse-error.rs:53:36
145145
|
146146
LL | asm!("{a}", a = const foo, a = const bar);
147147
| ^^^^^^^^^^^^^ argument never used
148148
|
149149
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
150150

151151
error: explicit register arguments cannot have names
152-
--> $DIR/parse-error.rs:59:18
152+
--> $DIR/parse-error.rs:58:18
153153
|
154154
LL | asm!("", a = in("x0") foo);
155155
| ^^^^^^^^^^^^^^^^
156156

157157
error: named arguments cannot follow explicit register arguments
158-
--> $DIR/parse-error.rs:61:35
158+
--> $DIR/parse-error.rs:60:35
159159
|
160160
LL | asm!("{a}", in("x0") foo, a = const bar);
161161
| ------------ ^^^^^^^^^^^^^ named argument
162162
| |
163163
| explicit register argument
164164

165165
error: named arguments cannot follow explicit register arguments
166-
--> $DIR/parse-error.rs:64:35
166+
--> $DIR/parse-error.rs:63:35
167167
|
168168
LL | asm!("{a}", in("x0") foo, a = const bar);
169169
| ------------ ^^^^^^^^^^^^^ named argument
170170
| |
171171
| explicit register argument
172172

173173
error: positional arguments cannot follow named arguments or explicit register arguments
174-
--> $DIR/parse-error.rs:67:35
174+
--> $DIR/parse-error.rs:66:35
175175
|
176176
LL | asm!("{1}", in("x0") foo, const bar);
177177
| ------------ ^^^^^^^^^ positional argument
178178
| |
179179
| explicit register argument
180180

181181
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
182-
--> $DIR/parse-error.rs:70:29
182+
--> $DIR/parse-error.rs:69:29
183183
|
184184
LL | asm!("", options(), "");
185185
| ^^ expected one of 9 possible tokens
186186

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

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

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

209209
error: _ cannot be used for input operands
210-
--> $DIR/parse-error.rs:78:28
210+
--> $DIR/parse-error.rs:77:28
211211
|
212212
LL | asm!("{}", in(reg) _);
213213
| ^
214214

215215
error: _ cannot be used for input operands
216-
--> $DIR/parse-error.rs:80:31
216+
--> $DIR/parse-error.rs:79:31
217217
|
218218
LL | asm!("{}", inout(reg) _);
219219
| ^
220220

221221
error: _ cannot be used for input operands
222-
--> $DIR/parse-error.rs:82:35
222+
--> $DIR/parse-error.rs:81:35
223223
|
224224
LL | asm!("{}", inlateout(reg) _);
225225
| ^
226226

227227
error: requires at least a template string argument
228-
--> $DIR/parse-error.rs:89:1
228+
--> $DIR/parse-error.rs:88:1
229229
|
230230
LL | global_asm!();
231231
| ^^^^^^^^^^^^^
232232

233233
error: asm template must be a string literal
234-
--> $DIR/parse-error.rs:91:13
234+
--> $DIR/parse-error.rs:90:13
235235
|
236236
LL | global_asm!(FOO);
237237
| ^^^
238238

239239
error: expected token: `,`
240-
--> $DIR/parse-error.rs:93:18
240+
--> $DIR/parse-error.rs:92:18
241241
|
242242
LL | global_asm!("{}" FOO);
243243
| ^^^ expected `,`
244244

245245
error: expected operand, options, or additional template string
246-
--> $DIR/parse-error.rs:95:19
246+
--> $DIR/parse-error.rs:94:19
247247
|
248248
LL | global_asm!("{}", FOO);
249249
| ^^^ expected operand, options, or additional template string
250250

251251
error: expected expression, found end of macro arguments
252-
--> $DIR/parse-error.rs:97:24
252+
--> $DIR/parse-error.rs:96:24
253253
|
254254
LL | global_asm!("{}", const);
255255
| ^ expected expression
256256

257257
error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
258-
--> $DIR/parse-error.rs:99:30
258+
--> $DIR/parse-error.rs:98:30
259259
|
260260
LL | global_asm!("{}", const(reg) FOO);
261261
| ^^^ expected one of `,`, `.`, `?`, or an operator
262262

263263
error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
264-
--> $DIR/parse-error.rs:101:25
264+
--> $DIR/parse-error.rs:100:25
265265
|
266266
LL | global_asm!("", options(FOO));
267267
| ^^^ expected one of `)`, `att_syntax`, or `raw`
268268

269269
error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
270-
--> $DIR/parse-error.rs:103:25
270+
--> $DIR/parse-error.rs:102:25
271271
|
272272
LL | global_asm!("", options(nomem FOO));
273273
| ^^^^^ expected one of `)`, `att_syntax`, or `raw`
274274

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

281281
error: arguments are not allowed after options
282-
--> $DIR/parse-error.rs:107:30
282+
--> $DIR/parse-error.rs:106:30
283283
|
284284
LL | global_asm!("{}", options(), const FOO);
285285
| --------- ^^^^^^^^^ argument
286286
| |
287287
| previous options
288288

289289
error: expected string literal
290-
--> $DIR/parse-error.rs:109:29
290+
--> $DIR/parse-error.rs:108:29
291291
|
292292
LL | global_asm!("", clobber_abi(FOO));
293293
| ^^^ not a string literal
294294

295-
error: expected `)`, found `FOO`
296-
--> $DIR/parse-error.rs:111:33
295+
error: expected one of `)` or `,`, found `FOO`
296+
--> $DIR/parse-error.rs:110:33
297297
|
298298
LL | global_asm!("", clobber_abi("C" FOO));
299-
| ^^^ expected `)`
299+
| ^^^ expected one of `)` or `,`
300300

301-
error: expected `)`, found `,`
302-
--> $DIR/parse-error.rs:113:32
301+
error: expected string literal
302+
--> $DIR/parse-error.rs:112:34
303303
|
304304
LL | global_asm!("", clobber_abi("C", FOO));
305-
| ^ expected `)`
305+
| ^^^ not a string literal
306306

307307
error: arguments are not allowed after clobber_abi
308-
--> $DIR/parse-error.rs:115:37
308+
--> $DIR/parse-error.rs:114:37
309309
|
310310
LL | global_asm!("{}", clobber_abi("C"), const FOO);
311311
| ---------------- ^^^^^^^^^ argument
312312
| |
313313
| clobber_abi
314314

315315
error: `clobber_abi` cannot be used with `global_asm!`
316-
--> $DIR/parse-error.rs:115:19
316+
--> $DIR/parse-error.rs:114:19
317317
|
318318
LL | global_asm!("{}", clobber_abi("C"), const FOO);
319319
| ^^^^^^^^^^^^^^^^
320320

321321
error: clobber_abi is not allowed after options
322-
--> $DIR/parse-error.rs:118:28
322+
--> $DIR/parse-error.rs:117:28
323323
|
324324
LL | global_asm!("", options(), clobber_abi("C"));
325325
| --------- ^^^^^^^^^^^^^^^^
326326
| |
327327
| options
328328

329329
error: clobber_abi is not allowed after options
330-
--> $DIR/parse-error.rs:120:30
330+
--> $DIR/parse-error.rs:119:30
331331
|
332332
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
333333
| --------- ^^^^^^^^^^^^^^^^
334334
| |
335335
| options
336336

337-
error: `clobber_abi` cannot be used with `global_asm!`
338-
--> $DIR/parse-error.rs:122:35
339-
|
340-
LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
341-
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
342-
343337
error: duplicate argument named `a`
344-
--> $DIR/parse-error.rs:124:35
338+
--> $DIR/parse-error.rs:121:35
345339
|
346340
LL | global_asm!("{a}", a = const FOO, a = const BAR);
347341
| ------------- ^^^^^^^^^^^^^ duplicate argument
348342
| |
349343
| previously here
350344

351345
error: argument never used
352-
--> $DIR/parse-error.rs:124:35
346+
--> $DIR/parse-error.rs:121:35
353347
|
354348
LL | global_asm!("{a}", a = const FOO, a = const BAR);
355349
| ^^^^^^^^^^^^^ argument never used
356350
|
357351
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
358352

359353
error: expected one of `clobber_abi`, `const`, or `options`, found `""`
360-
--> $DIR/parse-error.rs:127:28
354+
--> $DIR/parse-error.rs:124:28
361355
|
362356
LL | global_asm!("", options(), "");
363357
| ^^ expected one of `clobber_abi`, `const`, or `options`
364358

365359
error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"`
366-
--> $DIR/parse-error.rs:129:30
360+
--> $DIR/parse-error.rs:126:30
367361
|
368362
LL | global_asm!("{}", const FOO, "{}", const FOO);
369363
| ^^^^ expected one of `clobber_abi`, `const`, or `options`
370364

371365
error: asm template must be a string literal
372-
--> $DIR/parse-error.rs:131:13
366+
--> $DIR/parse-error.rs:128:13
373367
|
374368
LL | global_asm!(format!("{{{}}}", 0), const FOO);
375369
| ^^^^^^^^^^^^^^^^^^^^
376370
|
377371
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
378372

379373
error: asm template must be a string literal
380-
--> $DIR/parse-error.rs:133:20
374+
--> $DIR/parse-error.rs:130:20
381375
|
382376
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
383377
| ^^^^^^^^^^^^^^^^^^^^
@@ -403,7 +397,7 @@ LL | asm!("{}", clobber_abi("C"), const foo);
403397
| ^^^ non-constant value
404398

405399
error[E0435]: attempt to use a non-constant value in a constant
406-
--> $DIR/parse-error.rs:54:31
400+
--> $DIR/parse-error.rs:53:31
407401
|
408402
LL | let mut foo = 0;
409403
| ---------- help: consider using `const` instead of `let`: `const foo`
@@ -412,7 +406,7 @@ LL | asm!("{a}", a = const foo, a = const bar);
412406
| ^^^ non-constant value
413407

414408
error[E0435]: attempt to use a non-constant value in a constant
415-
--> $DIR/parse-error.rs:54:46
409+
--> $DIR/parse-error.rs:53:46
416410
|
417411
LL | let mut bar = 0;
418412
| ---------- help: consider using `const` instead of `let`: `const bar`
@@ -421,7 +415,7 @@ LL | asm!("{a}", a = const foo, a = const bar);
421415
| ^^^ non-constant value
422416

423417
error[E0435]: attempt to use a non-constant value in a constant
424-
--> $DIR/parse-error.rs:61:45
418+
--> $DIR/parse-error.rs:60:45
425419
|
426420
LL | let mut bar = 0;
427421
| ---------- help: consider using `const` instead of `let`: `const bar`
@@ -430,7 +424,7 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
430424
| ^^^ non-constant value
431425

432426
error[E0435]: attempt to use a non-constant value in a constant
433-
--> $DIR/parse-error.rs:64:45
427+
--> $DIR/parse-error.rs:63:45
434428
|
435429
LL | let mut bar = 0;
436430
| ---------- help: consider using `const` instead of `let`: `const bar`
@@ -439,14 +433,14 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
439433
| ^^^ non-constant value
440434

441435
error[E0435]: attempt to use a non-constant value in a constant
442-
--> $DIR/parse-error.rs:67:41
436+
--> $DIR/parse-error.rs:66:41
443437
|
444438
LL | let mut bar = 0;
445439
| ---------- help: consider using `const` instead of `let`: `const bar`
446440
...
447441
LL | asm!("{1}", in("x0") foo, const bar);
448442
| ^^^ non-constant value
449443

450-
error: aborting due to 65 previous errors
444+
error: aborting due to 64 previous errors
451445

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

0 commit comments

Comments
 (0)