Fix aarch tests

This commit is contained in:
asquared31415 2021-10-17 03:30:24 -04:00
parent b233d3b5da
commit f3e42cb160
2 changed files with 51 additions and 60 deletions

View file

@ -50,7 +50,6 @@ fn main() {
//~^ ERROR clobber_abi is not allowed after options
asm!("{}", options(), clobber_abi("C"), const foo);
//~^ ERROR clobber_abi is not allowed after options
asm!("", clobber_abi("C"), clobber_abi("C"));
asm!("{a}", a = const foo, a = const bar);
//~^ ERROR duplicate argument named `a`
//~^^ ERROR argument never used
@ -119,8 +118,6 @@ global_asm!("", options(), clobber_abi("C"));
//~^ ERROR clobber_abi is not allowed after options
global_asm!("{}", options(), clobber_abi("C"), const FOO);
//~^ ERROR clobber_abi is not allowed after options
global_asm!("", clobber_abi("C"), clobber_abi("C"));
//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
global_asm!("{a}", a = const FOO, a = const BAR);
//~^ ERROR duplicate argument named `a`
//~^^ ERROR argument never used

View file

@ -96,17 +96,17 @@ error: expected string literal
LL | asm!("", clobber_abi(foo));
| ^^^ not a string literal
error: expected `)`, found `foo`
error: expected one of `)` or `,`, found `foo`
--> $DIR/parse-error.rs:42:34
|
LL | asm!("", clobber_abi("C" foo));
| ^^^ expected `)`
| ^^^ expected one of `)` or `,`
error: expected `)`, found `,`
--> $DIR/parse-error.rs:44:33
error: expected string literal
--> $DIR/parse-error.rs:44:35
|
LL | asm!("", clobber_abi("C", foo));
| ^ expected `)`
| ^^^ not a string literal
error: arguments are not allowed after clobber_abi
--> $DIR/parse-error.rs:46:38
@ -133,7 +133,7 @@ LL | asm!("{}", options(), clobber_abi("C"), const foo);
| options
error: duplicate argument named `a`
--> $DIR/parse-error.rs:54:36
--> $DIR/parse-error.rs:53:36
|
LL | asm!("{a}", a = const foo, a = const bar);
| ------------- ^^^^^^^^^^^^^ duplicate argument
@ -141,7 +141,7 @@ LL | asm!("{a}", a = const foo, a = const bar);
| previously here
error: argument never used
--> $DIR/parse-error.rs:54:36
--> $DIR/parse-error.rs:53:36
|
LL | asm!("{a}", a = const foo, a = const bar);
| ^^^^^^^^^^^^^ argument never used
@ -149,13 +149,13 @@ LL | asm!("{a}", a = const foo, a = const bar);
= 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:59:18
--> $DIR/parse-error.rs:58:18
|
LL | asm!("", a = in("x0") foo);
| ^^^^^^^^^^^^^^^^
error: named arguments cannot follow explicit register arguments
--> $DIR/parse-error.rs:61:35
--> $DIR/parse-error.rs:60:35
|
LL | asm!("{a}", in("x0") foo, a = const bar);
| ------------ ^^^^^^^^^^^^^ named argument
@ -163,7 +163,7 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
| explicit register argument
error: named arguments cannot follow explicit register arguments
--> $DIR/parse-error.rs:64:35
--> $DIR/parse-error.rs:63:35
|
LL | asm!("{a}", in("x0") foo, a = const bar);
| ------------ ^^^^^^^^^^^^^ named argument
@ -171,7 +171,7 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
| explicit register argument
error: positional arguments cannot follow named arguments or explicit register arguments
--> $DIR/parse-error.rs:67:35
--> $DIR/parse-error.rs:66:35
|
LL | asm!("{1}", in("x0") foo, const bar);
| ------------ ^^^^^^^^^ positional argument
@ -179,19 +179,19 @@ LL | asm!("{1}", in("x0") foo, const bar);
| explicit register argument
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
--> $DIR/parse-error.rs:70:29
--> $DIR/parse-error.rs:69: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:72:33
--> $DIR/parse-error.rs:71: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:74:14
--> $DIR/parse-error.rs:73:14
|
LL | asm!(format!("{{{}}}", 0), in(reg) foo);
| ^^^^^^^^^^^^^^^^^^^^
@ -199,7 +199,7 @@ 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:76:21
--> $DIR/parse-error.rs:75:21
|
LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
| ^^^^^^^^^^^^^^^^^^^^
@ -207,79 +207,79 @@ 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:78:28
--> $DIR/parse-error.rs:77:28
|
LL | asm!("{}", in(reg) _);
| ^
error: _ cannot be used for input operands
--> $DIR/parse-error.rs:80:31
--> $DIR/parse-error.rs:79:31
|
LL | asm!("{}", inout(reg) _);
| ^
error: _ cannot be used for input operands
--> $DIR/parse-error.rs:82:35
--> $DIR/parse-error.rs:81:35
|
LL | asm!("{}", inlateout(reg) _);
| ^
error: requires at least a template string argument
--> $DIR/parse-error.rs:89:1
--> $DIR/parse-error.rs:88:1
|
LL | global_asm!();
| ^^^^^^^^^^^^^
error: asm template must be a string literal
--> $DIR/parse-error.rs:91:13
--> $DIR/parse-error.rs:90:13
|
LL | global_asm!(FOO);
| ^^^
error: expected token: `,`
--> $DIR/parse-error.rs:93:18
--> $DIR/parse-error.rs:92:18
|
LL | global_asm!("{}" FOO);
| ^^^ expected `,`
error: expected operand, options, or additional template string
--> $DIR/parse-error.rs:95:19
--> $DIR/parse-error.rs:94:19
|
LL | global_asm!("{}", FOO);
| ^^^ expected operand, options, or additional template string
error: expected expression, found end of macro arguments
--> $DIR/parse-error.rs:97:24
--> $DIR/parse-error.rs:96:24
|
LL | global_asm!("{}", const);
| ^ expected expression
error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
--> $DIR/parse-error.rs:99:30
--> $DIR/parse-error.rs:98: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:101:25
--> $DIR/parse-error.rs:100: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:103:25
--> $DIR/parse-error.rs:102: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:105:25
--> $DIR/parse-error.rs:104: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:107:30
--> $DIR/parse-error.rs:106:30
|
LL | global_asm!("{}", options(), const FOO);
| --------- ^^^^^^^^^ argument
@ -287,25 +287,25 @@ LL | global_asm!("{}", options(), const FOO);
| previous options
error: expected string literal
--> $DIR/parse-error.rs:109:29
--> $DIR/parse-error.rs:108:29
|
LL | global_asm!("", clobber_abi(FOO));
| ^^^ not a string literal
error: expected `)`, found `FOO`
--> $DIR/parse-error.rs:111:33
error: expected one of `)` or `,`, found `FOO`
--> $DIR/parse-error.rs:110:33
|
LL | global_asm!("", clobber_abi("C" FOO));
| ^^^ expected `)`
| ^^^ expected one of `)` or `,`
error: expected `)`, found `,`
--> $DIR/parse-error.rs:113:32
error: expected string literal
--> $DIR/parse-error.rs:112:34
|
LL | global_asm!("", clobber_abi("C", FOO));
| ^ expected `)`
| ^^^ not a string literal
error: arguments are not allowed after clobber_abi
--> $DIR/parse-error.rs:115:37
--> $DIR/parse-error.rs:114:37
|
LL | global_asm!("{}", clobber_abi("C"), const FOO);
| ---------------- ^^^^^^^^^ argument
@ -313,13 +313,13 @@ LL | global_asm!("{}", clobber_abi("C"), const FOO);
| clobber_abi
error: `clobber_abi` cannot be used with `global_asm!`
--> $DIR/parse-error.rs:115:19
--> $DIR/parse-error.rs:114:19
|
LL | global_asm!("{}", clobber_abi("C"), const FOO);
| ^^^^^^^^^^^^^^^^
error: clobber_abi is not allowed after options
--> $DIR/parse-error.rs:118:28
--> $DIR/parse-error.rs:117:28
|
LL | global_asm!("", options(), clobber_abi("C"));
| --------- ^^^^^^^^^^^^^^^^
@ -327,21 +327,15 @@ LL | global_asm!("", options(), clobber_abi("C"));
| options
error: clobber_abi is not allowed after options
--> $DIR/parse-error.rs:120:30
--> $DIR/parse-error.rs:119:30
|
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| --------- ^^^^^^^^^^^^^^^^
| |
| options
error: `clobber_abi` cannot be used with `global_asm!`
--> $DIR/parse-error.rs:122:35
|
LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
error: duplicate argument named `a`
--> $DIR/parse-error.rs:124:35
--> $DIR/parse-error.rs:121:35
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ------------- ^^^^^^^^^^^^^ duplicate argument
@ -349,7 +343,7 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
| previously here
error: argument never used
--> $DIR/parse-error.rs:124:35
--> $DIR/parse-error.rs:121:35
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ^^^^^^^^^^^^^ argument never used
@ -357,19 +351,19 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
error: expected one of `clobber_abi`, `const`, or `options`, found `""`
--> $DIR/parse-error.rs:127:28
--> $DIR/parse-error.rs:124:28
|
LL | global_asm!("", options(), "");
| ^^ expected one of `clobber_abi`, `const`, or `options`
error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"`
--> $DIR/parse-error.rs:129:30
--> $DIR/parse-error.rs:126:30
|
LL | global_asm!("{}", const FOO, "{}", const FOO);
| ^^^^ expected one of `clobber_abi`, `const`, or `options`
error: asm template must be a string literal
--> $DIR/parse-error.rs:131:13
--> $DIR/parse-error.rs:128:13
|
LL | global_asm!(format!("{{{}}}", 0), const FOO);
| ^^^^^^^^^^^^^^^^^^^^
@ -377,7 +371,7 @@ 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:133:20
--> $DIR/parse-error.rs:130:20
|
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
| ^^^^^^^^^^^^^^^^^^^^
@ -403,7 +397,7 @@ 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:54:31
--> $DIR/parse-error.rs:53:31
|
LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo`
@ -412,7 +406,7 @@ 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:54:46
--> $DIR/parse-error.rs:53:46
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -421,7 +415,7 @@ 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:61:45
--> $DIR/parse-error.rs:60:45
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -430,7 +424,7 @@ 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:64:45
--> $DIR/parse-error.rs:63:45
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -439,7 +433,7 @@ 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:67:41
--> $DIR/parse-error.rs:66:41
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -447,6 +441,6 @@ LL | let mut bar = 0;
LL | asm!("{1}", in("x0") foo, const bar);
| ^^^ non-constant value
error: aborting due to 65 previous errors
error: aborting due to 64 previous errors
For more information about this error, try `rustc --explain E0435`.