Skip to content

Commit 3e4ddc3

Browse files
committed
update aarch64 asm tests
1 parent 8859da0 commit 3e4ddc3

File tree

7 files changed

+61
-47
lines changed

7 files changed

+61
-47
lines changed

tests/ui/asm/aarch64/bad-options.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ fn main() {
2626
}
2727

2828
global_asm!("", options(nomem));
29-
//~^ ERROR expected one of
29+
//~^ ERROR the `nomem` option cannot be used with `global_asm!`
3030
global_asm!("", options(readonly));
31-
//~^ ERROR expected one of
31+
//~^ ERROR the `readonly` option cannot be used with `global_asm!`
3232
global_asm!("", options(noreturn));
33-
//~^ ERROR expected one of
33+
//~^ ERROR the `noreturn` option cannot be used with `global_asm!`
3434
global_asm!("", options(pure));
35-
//~^ ERROR expected one of
35+
//~^ ERROR the `pure` option cannot be used with `global_asm!`
3636
global_asm!("", options(nostack));
37-
//~^ ERROR expected one of
37+
//~^ ERROR the `nostack` option cannot be used with `global_asm!`
3838
global_asm!("", options(preserves_flags));
39-
//~^ ERROR expected one of
39+
//~^ ERROR the `preserves_flags` option cannot be used with `global_asm!`

tests/ui/asm/aarch64/bad-options.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,41 @@ LL | asm!("{}", out(reg) foo, clobber_abi("C"));
3636
| |
3737
| generic outputs
3838

39-
error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
39+
error: the `nomem` option cannot be used with `global_asm!`
4040
--> $DIR/bad-options.rs:28:25
4141
|
4242
LL | global_asm!("", options(nomem));
43-
| ^^^^^ expected one of `)`, `att_syntax`, or `raw`
43+
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
4444

45-
error: expected one of `)`, `att_syntax`, or `raw`, found `readonly`
45+
error: the `readonly` option cannot be used with `global_asm!`
4646
--> $DIR/bad-options.rs:30:25
4747
|
4848
LL | global_asm!("", options(readonly));
49-
| ^^^^^^^^ expected one of `)`, `att_syntax`, or `raw`
49+
| ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly
5050

51-
error: expected one of `)`, `att_syntax`, or `raw`, found `noreturn`
51+
error: the `noreturn` option cannot be used with `global_asm!`
5252
--> $DIR/bad-options.rs:32:25
5353
|
5454
LL | global_asm!("", options(noreturn));
55-
| ^^^^^^^^ expected one of `)`, `att_syntax`, or `raw`
55+
| ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly
5656

57-
error: expected one of `)`, `att_syntax`, or `raw`, found `pure`
57+
error: the `pure` option cannot be used with `global_asm!`
5858
--> $DIR/bad-options.rs:34:25
5959
|
6060
LL | global_asm!("", options(pure));
61-
| ^^^^ expected one of `)`, `att_syntax`, or `raw`
61+
| ^^^^ the `pure` option is not meaningful for global-scoped inline assembly
6262

63-
error: expected one of `)`, `att_syntax`, or `raw`, found `nostack`
63+
error: the `nostack` option cannot be used with `global_asm!`
6464
--> $DIR/bad-options.rs:36:25
6565
|
6666
LL | global_asm!("", options(nostack));
67-
| ^^^^^^^ expected one of `)`, `att_syntax`, or `raw`
67+
| ^^^^^^^ the `nostack` option is not meaningful for global-scoped inline assembly
6868

69-
error: expected one of `)`, `att_syntax`, or `raw`, found `preserves_flags`
69+
error: the `preserves_flags` option cannot be used with `global_asm!`
7070
--> $DIR/bad-options.rs:38:25
7171
|
7272
LL | global_asm!("", options(preserves_flags));
73-
| ^^^^^^^^^^^^^^^ expected one of `)`, `att_syntax`, or `raw`
73+
| ^^^^^^^^^^^^^^^ the `preserves_flags` option is not meaningful for global-scoped inline assembly
7474

7575
error: invalid ABI for `clobber_abi`
7676
--> $DIR/bad-options.rs:20:18

tests/ui/asm/aarch64/parse-error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ global_asm!("", options(FOO));
9898
//~^ ERROR expected one of
9999
global_asm!("", options(nomem FOO));
100100
//~^ ERROR expected one of
101+
//~| ERROR the `nomem` option cannot be used with `global_asm!`
101102
global_asm!("", options(nomem, FOO));
102103
//~^ ERROR expected one of
104+
//~| ERROR the `nomem` option cannot be used with `global_asm!`
103105
global_asm!("{}", options(), const FOO);
104106
global_asm!("", clobber_abi(FOO));
105107
//~^ ERROR expected string literal

tests/ui/asm/aarch64/parse-error.stderr

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -218,92 +218,104 @@ error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
218218
LL | global_asm!("", options(FOO));
219219
| ^^^ expected one of `)`, `att_syntax`, or `raw`
220220

221-
error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
221+
error: the `nomem` option cannot be used with `global_asm!`
222222
--> $DIR/parse-error.rs:99:25
223223
|
224224
LL | global_asm!("", options(nomem FOO));
225-
| ^^^^^ expected one of `)`, `att_syntax`, or `raw`
225+
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
226226

227-
error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
228-
--> $DIR/parse-error.rs:101:25
227+
error: expected one of `)` or `,`, found `FOO`
228+
--> $DIR/parse-error.rs:99:31
229+
|
230+
LL | global_asm!("", options(nomem FOO));
231+
| ^^^ expected one of `)` or `,`
232+
233+
error: the `nomem` option cannot be used with `global_asm!`
234+
--> $DIR/parse-error.rs:102:25
235+
|
236+
LL | global_asm!("", options(nomem, FOO));
237+
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
238+
239+
error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
240+
--> $DIR/parse-error.rs:102:32
229241
|
230242
LL | global_asm!("", options(nomem, FOO));
231-
| ^^^^^ expected one of `)`, `att_syntax`, or `raw`
243+
| ^^^ expected one of `)`, `att_syntax`, or `raw`
232244

233245
error: expected string literal
234-
--> $DIR/parse-error.rs:104:29
246+
--> $DIR/parse-error.rs:106:29
235247
|
236248
LL | global_asm!("", clobber_abi(FOO));
237249
| ^^^ not a string literal
238250

239251
error: expected one of `)` or `,`, found `FOO`
240-
--> $DIR/parse-error.rs:106:33
252+
--> $DIR/parse-error.rs:108:33
241253
|
242254
LL | global_asm!("", clobber_abi("C" FOO));
243255
| ^^^ expected one of `)` or `,`
244256

245257
error: expected string literal
246-
--> $DIR/parse-error.rs:108:34
258+
--> $DIR/parse-error.rs:110:34
247259
|
248260
LL | global_asm!("", clobber_abi("C", FOO));
249261
| ^^^ not a string literal
250262

251263
error: `clobber_abi` cannot be used with `global_asm!`
252-
--> $DIR/parse-error.rs:110:19
264+
--> $DIR/parse-error.rs:112:19
253265
|
254266
LL | global_asm!("{}", clobber_abi("C"), const FOO);
255267
| ^^^^^^^^^^^^^^^^
256268

257269
error: `clobber_abi` cannot be used with `global_asm!`
258-
--> $DIR/parse-error.rs:112:28
270+
--> $DIR/parse-error.rs:114:28
259271
|
260272
LL | global_asm!("", options(), clobber_abi("C"));
261273
| ^^^^^^^^^^^^^^^^
262274

263275
error: `clobber_abi` cannot be used with `global_asm!`
264-
--> $DIR/parse-error.rs:114:30
276+
--> $DIR/parse-error.rs:116:30
265277
|
266278
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
267279
| ^^^^^^^^^^^^^^^^
268280

269281
error: duplicate argument named `a`
270-
--> $DIR/parse-error.rs:116:35
282+
--> $DIR/parse-error.rs:118:35
271283
|
272284
LL | global_asm!("{a}", a = const FOO, a = const BAR);
273285
| ------------- ^^^^^^^^^^^^^ duplicate argument
274286
| |
275287
| previously here
276288

277289
error: argument never used
278-
--> $DIR/parse-error.rs:116:35
290+
--> $DIR/parse-error.rs:118:35
279291
|
280292
LL | global_asm!("{a}", a = const FOO, a = const BAR);
281293
| ^^^^^^^^^^^^^ argument never used
282294
|
283295
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
284296

285297
error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
286-
--> $DIR/parse-error.rs:119:28
298+
--> $DIR/parse-error.rs:121:28
287299
|
288300
LL | global_asm!("", options(), "");
289301
| ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
290302

291303
error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
292-
--> $DIR/parse-error.rs:121:30
304+
--> $DIR/parse-error.rs:123:30
293305
|
294306
LL | global_asm!("{}", const FOO, "{}", const FOO);
295307
| ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
296308

297309
error: asm template must be a string literal
298-
--> $DIR/parse-error.rs:123:13
310+
--> $DIR/parse-error.rs:125:13
299311
|
300312
LL | global_asm!(format!("{{{}}}", 0), const FOO);
301313
| ^^^^^^^^^^^^^^^^^^^^
302314
|
303315
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
304316

305317
error: asm template must be a string literal
306-
--> $DIR/parse-error.rs:125:20
318+
--> $DIR/parse-error.rs:127:20
307319
|
308320
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
309321
| ^^^^^^^^^^^^^^^^^^^^
@@ -398,6 +410,6 @@ help: consider using `const` instead of `let`
398410
LL | const bar: /* Type */ = 0;
399411
| ~~~~~ ++++++++++++
400412

401-
error: aborting due to 57 previous errors
413+
error: aborting due to 59 previous errors
402414

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

tests/ui/asm/unsupported-option.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::arch::global_asm;
44

55
fn main() {}
66

7-
global_asm!("", options(att_syntax, raw));
7+
global_asm!("", options( raw));
88
//~^ ERROR the `nomem` option cannot be used with `global_asm!`
99
//~| ERROR the `readonly` option cannot be used with `global_asm!`
1010
//~| ERROR the `noreturn` option cannot be used with `global_asm!`

tests/ui/asm/unsupported-option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::arch::global_asm;
44

55
fn main() {}
66

7-
global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
7+
global_asm!("", options(nomem, readonly, noreturn, raw));
88
//~^ ERROR the `nomem` option cannot be used with `global_asm!`
99
//~| ERROR the `readonly` option cannot be used with `global_asm!`
1010
//~| ERROR the `noreturn` option cannot be used with `global_asm!`
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
error: the `nomem` option cannot be used with `global_asm!`
2-
--> $DIR/unsupported-option.rs:7:37
2+
--> $DIR/unsupported-option.rs:7:25
33
|
4-
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
5-
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
4+
LL | global_asm!("", options(nomem, readonly, noreturn, raw));
5+
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
66

77
error: the `readonly` option cannot be used with `global_asm!`
8-
--> $DIR/unsupported-option.rs:7:44
8+
--> $DIR/unsupported-option.rs:7:32
99
|
10-
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
11-
| ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly
10+
LL | global_asm!("", options(nomem, readonly, noreturn, raw));
11+
| ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly
1212

1313
error: the `noreturn` option cannot be used with `global_asm!`
14-
--> $DIR/unsupported-option.rs:7:54
14+
--> $DIR/unsupported-option.rs:7:42
1515
|
16-
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
17-
| ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly
16+
LL | global_asm!("", options(nomem, readonly, noreturn, raw));
17+
| ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly
1818

1919
error: aborting due to 3 previous errors
2020

0 commit comments

Comments
 (0)