Re-bless asm tests for aarch64

This commit is contained in:
Amanieu d'Antras 2021-12-11 00:11:10 +00:00
parent 44a3a66ee8
commit 0dcd812de8
7 changed files with 154 additions and 152 deletions

View File

@ -1,17 +1,17 @@
error: invalid register class `foo`: unknown register class
--> $DIR/bad-reg.rs:12:20
--> $DIR/bad-reg.rs:14:20
|
LL | asm!("{}", in(foo) foo);
| ^^^^^^^^^^^
error: invalid register `foo`: unknown register
--> $DIR/bad-reg.rs:14:18
--> $DIR/bad-reg.rs:16:18
|
LL | asm!("", in("foo") foo);
| ^^^^^^^^^^^^^
error: invalid asm template modifier for this register class
--> $DIR/bad-reg.rs:16:15
--> $DIR/bad-reg.rs:18:15
|
LL | asm!("{:z}", in(reg) foo);
| ^^^^ ----------- argument
@ -21,7 +21,7 @@ LL | asm!("{:z}", in(reg) foo);
= note: the `reg` register class supports the following template modifiers: `w`, `x`
error: invalid asm template modifier for this register class
--> $DIR/bad-reg.rs:18:15
--> $DIR/bad-reg.rs:20:15
|
LL | asm!("{:r}", in(vreg) foo);
| ^^^^ ------------ argument
@ -31,7 +31,7 @@ LL | asm!("{:r}", in(vreg) foo);
= note: the `vreg` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`
error: invalid asm template modifier for this register class
--> $DIR/bad-reg.rs:20:15
--> $DIR/bad-reg.rs:22:15
|
LL | asm!("{:r}", in(vreg_low16) foo);
| ^^^^ ------------------ argument
@ -41,7 +41,7 @@ LL | asm!("{:r}", in(vreg_low16) foo);
= note: the `vreg_low16` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`
error: asm template modifiers are not allowed for `const` arguments
--> $DIR/bad-reg.rs:22:15
--> $DIR/bad-reg.rs:24:15
|
LL | asm!("{:a}", const 0);
| ^^^^ ------- argument
@ -49,7 +49,7 @@ LL | asm!("{:a}", const 0);
| template modifier
error: asm template modifiers are not allowed for `sym` arguments
--> $DIR/bad-reg.rs:24:15
--> $DIR/bad-reg.rs:26:15
|
LL | asm!("{:a}", sym main);
| ^^^^ -------- argument
@ -57,49 +57,49 @@ LL | asm!("{:a}", sym main);
| template modifier
error: invalid register `x29`: the frame pointer cannot be used as an operand for inline asm
--> $DIR/bad-reg.rs:26:18
--> $DIR/bad-reg.rs:28:18
|
LL | asm!("", in("x29") foo);
| ^^^^^^^^^^^^^
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
--> $DIR/bad-reg.rs:28:18
--> $DIR/bad-reg.rs:30:18
|
LL | asm!("", in("sp") foo);
| ^^^^^^^^^^^^
error: invalid register `xzr`: the zero register cannot be used as an operand for inline asm
--> $DIR/bad-reg.rs:30:18
--> $DIR/bad-reg.rs:32:18
|
LL | asm!("", in("xzr") foo);
| ^^^^^^^^^^^^^
error: invalid register `x19`: x19 is used internally by LLVM and cannot be used as an operand for inline asm
--> $DIR/bad-reg.rs:32:18
--> $DIR/bad-reg.rs:34:18
|
LL | asm!("", in("x19") foo);
| ^^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output
--> $DIR/bad-reg.rs:35:18
--> $DIR/bad-reg.rs:37:18
|
LL | asm!("", in("p0") foo);
| ^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output
--> $DIR/bad-reg.rs:38:20
--> $DIR/bad-reg.rs:40:20
|
LL | asm!("{}", in(preg) foo);
| ^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output
--> $DIR/bad-reg.rs:40:20
--> $DIR/bad-reg.rs:42:20
|
LL | asm!("{}", out(preg) _);
| ^^^^^^^^^^^
error: register `x0` conflicts with register `x0`
--> $DIR/bad-reg.rs:46:32
--> $DIR/bad-reg.rs:48:32
|
LL | asm!("", in("x0") foo, in("w0") bar);
| ------------ ^^^^^^^^^^^^ register `x0`
@ -107,7 +107,7 @@ LL | asm!("", in("x0") foo, in("w0") bar);
| register `x0`
error: register `x0` conflicts with register `x0`
--> $DIR/bad-reg.rs:48:32
--> $DIR/bad-reg.rs:50:32
|
LL | asm!("", in("x0") foo, out("x0") bar);
| ------------ ^^^^^^^^^^^^^ register `x0`
@ -115,13 +115,13 @@ LL | asm!("", in("x0") foo, out("x0") bar);
| register `x0`
|
help: use `lateout` instead of `out` to avoid conflict
--> $DIR/bad-reg.rs:48:18
--> $DIR/bad-reg.rs:50:18
|
LL | asm!("", in("x0") foo, out("x0") bar);
| ^^^^^^^^^^^^
error: register `v0` conflicts with register `v0`
--> $DIR/bad-reg.rs:51:32
--> $DIR/bad-reg.rs:53:32
|
LL | asm!("", in("v0") foo, in("q0") bar);
| ------------ ^^^^^^^^^^^^ register `v0`
@ -129,7 +129,7 @@ LL | asm!("", in("v0") foo, in("q0") bar);
| register `v0`
error: register `v0` conflicts with register `v0`
--> $DIR/bad-reg.rs:53:32
--> $DIR/bad-reg.rs:55:32
|
LL | asm!("", in("v0") foo, out("q0") bar);
| ------------ ^^^^^^^^^^^^^ register `v0`
@ -137,7 +137,7 @@ LL | asm!("", in("v0") foo, out("q0") bar);
| register `v0`
|
help: use `lateout` instead of `out` to avoid conflict
--> $DIR/bad-reg.rs:53:18
--> $DIR/bad-reg.rs:55:18
|
LL | asm!("", in("v0") foo, out("q0") bar);
| ^^^^^^^^^^^^

View File

@ -1,6 +1,8 @@
// only-aarch64
// run-rustfix
use std::arch::asm;
fn main() {
unsafe {
asm!("", options(nomem, ));
@ -17,8 +19,8 @@ fn main() {
"",
options(nomem, noreturn),
options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
options( nostack), //~ ERROR the `nomem` option was already provided
options(), //~ ERROR the `noreturn` option was already provided
options( nostack), //~ ERROR the `nomem` option was already provided
options(), //~ ERROR the `noreturn` option was already provided
);
}
}

View File

@ -1,89 +1,89 @@
error: requires at least a template string argument
--> $DIR/parse-error.rs:9:9
--> $DIR/parse-error.rs:11:9
|
LL | asm!();
| ^^^^^^
error: asm template must be a string literal
--> $DIR/parse-error.rs:11:14
--> $DIR/parse-error.rs:13:14
|
LL | asm!(foo);
| ^^^
error: expected token: `,`
--> $DIR/parse-error.rs:13:19
--> $DIR/parse-error.rs:15:19
|
LL | asm!("{}" foo);
| ^^^ expected `,`
error: expected operand, clobber_abi, options, or additional template string
--> $DIR/parse-error.rs:15:20
--> $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:17:23
--> $DIR/parse-error.rs:19:23
|
LL | asm!("{}", in foo);
| ^^^ expected `(`
error: expected `)`, found `foo`
--> $DIR/parse-error.rs:19:27
--> $DIR/parse-error.rs:21:27
|
LL | asm!("{}", in(reg foo));
| ^^^ expected `)`
error: expected expression, found end of macro arguments
--> $DIR/parse-error.rs:21:27
--> $DIR/parse-error.rs:23:27
|
LL | asm!("{}", in(reg));
| ^ expected expression
error: expected register class or explicit register
--> $DIR/parse-error.rs:23:26
--> $DIR/parse-error.rs:25:26
|
LL | asm!("{}", inout(=) foo => bar);
| ^
error: expected expression, found end of macro arguments
--> $DIR/parse-error.rs:25:37
--> $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:27:32
--> $DIR/parse-error.rs:29:32
|
LL | asm!("{}", in(reg) foo => bar);
| ^^ expected one of 7 possible tokens
error: argument to `sym` must be a path expression
--> $DIR/parse-error.rs:29:24
--> $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:31:26
--> $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:33:32
--> $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:35:33
--> $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:37:31
--> $DIR/parse-error.rs:39:31
|
LL | asm!("{}", options(), const foo);
| --------- ^^^^^^^^^ argument
@ -91,25 +91,25 @@ LL | asm!("{}", options(), const foo);
| previous options
error: expected string literal
--> $DIR/parse-error.rs:40:30
--> $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:42:34
--> $DIR/parse-error.rs:44:34
|
LL | asm!("", clobber_abi("C" foo));
| ^^^ expected one of `)` or `,`
error: expected string literal
--> $DIR/parse-error.rs:44:35
--> $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:46:38
--> $DIR/parse-error.rs:48:38
|
LL | asm!("{}", clobber_abi("C"), const foo);
| ---------------- ^^^^^^^^^ argument
@ -117,7 +117,7 @@ LL | asm!("{}", clobber_abi("C"), const foo);
| clobber_abi
error: clobber_abi is not allowed after options
--> $DIR/parse-error.rs:49:29
--> $DIR/parse-error.rs:51:29
|
LL | asm!("", options(), clobber_abi("C"));
| --------- ^^^^^^^^^^^^^^^^
@ -125,7 +125,7 @@ LL | asm!("", options(), clobber_abi("C"));
| options
error: clobber_abi is not allowed after options
--> $DIR/parse-error.rs:51:31
--> $DIR/parse-error.rs:53:31
|
LL | asm!("{}", options(), clobber_abi("C"), const foo);
| --------- ^^^^^^^^^^^^^^^^
@ -133,7 +133,7 @@ LL | asm!("{}", options(), clobber_abi("C"), const foo);
| options
error: duplicate argument named `a`
--> $DIR/parse-error.rs:53:36
--> $DIR/parse-error.rs:55: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:53:36
--> $DIR/parse-error.rs:55: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:58:18
--> $DIR/parse-error.rs:60:18
|
LL | asm!("", a = in("x0") foo);
| ^^^^^^^^^^^^^^^^
error: named arguments cannot follow explicit register arguments
--> $DIR/parse-error.rs:60:35
--> $DIR/parse-error.rs:62: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:63:35
--> $DIR/parse-error.rs:65: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:66:35
--> $DIR/parse-error.rs:68: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:69:29
--> $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:71:33
--> $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:73:14
--> $DIR/parse-error.rs:75: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:75:21
--> $DIR/parse-error.rs:77: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:77:28
--> $DIR/parse-error.rs:79:28
|
LL | asm!("{}", in(reg) _);
| ^
error: _ cannot be used for input operands
--> $DIR/parse-error.rs:79:31
--> $DIR/parse-error.rs:81:31
|
LL | asm!("{}", inout(reg) _);
| ^
error: _ cannot be used for input operands
--> $DIR/parse-error.rs:81:35
--> $DIR/parse-error.rs:83:35
|
LL | asm!("{}", inlateout(reg) _);
| ^
error: requires at least a template string argument
--> $DIR/parse-error.rs:88:1
--> $DIR/parse-error.rs:90:1
|
LL | global_asm!();
| ^^^^^^^^^^^^^
error: asm template must be a string literal
--> $DIR/parse-error.rs:90:13
--> $DIR/parse-error.rs:92:13
|
LL | global_asm!(FOO);
| ^^^
error: expected token: `,`
--> $DIR/parse-error.rs:92:18
--> $DIR/parse-error.rs:94:18
|
LL | global_asm!("{}" FOO);
| ^^^ expected `,`
error: expected operand, options, or additional template string
--> $DIR/parse-error.rs:94:19
--> $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:96:24
--> $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:98:30
--> $DIR/parse-error.rs:100:30
|
LL | global_asm!("{}", const(reg) FOO);
| ^^^ expected one of `,`, `.`, `?`, or an operator
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `FOO`
--> $DIR/parse-error.rs:100:25
--> $DIR/parse-error.rs:102:25
|
LL | global_asm!("", options(FOO));
| ^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem`
--> $DIR/parse-error.rs:102:25
--> $DIR/parse-error.rs:104:25
|
LL | global_asm!("", options(nomem FOO));
| ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem`
--> $DIR/parse-error.rs:104:25
--> $DIR/parse-error.rs:106:25
|
LL | global_asm!("", options(nomem, FOO));
| ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: arguments are not allowed after options
--> $DIR/parse-error.rs:106:30
--> $DIR/parse-error.rs:108: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:108:29
--> $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:110:33
--> $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:112:34
--> $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:114:37
--> $DIR/parse-error.rs:116: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:114:19
--> $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:117:28
--> $DIR/parse-error.rs:119:28
|
LL | global_asm!("", options(), clobber_abi("C"));
| --------- ^^^^^^^^^^^^^^^^
@ -327,7 +327,7 @@ LL | global_asm!("", options(), clobber_abi("C"));
| options
error: clobber_abi is not allowed after options
--> $DIR/parse-error.rs:119:30
--> $DIR/parse-error.rs:121:30
|
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| --------- ^^^^^^^^^^^^^^^^
@ -335,7 +335,7 @@ LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| options
error: duplicate argument named `a`
--> $DIR/parse-error.rs:121:35
--> $DIR/parse-error.rs:123:35
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ------------- ^^^^^^^^^^^^^ duplicate argument
@ -343,7 +343,7 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
| previously here
error: argument never used
--> $DIR/parse-error.rs:121:35
--> $DIR/parse-error.rs:123:35
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ^^^^^^^^^^^^^ argument never used
@ -351,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:124:28
--> $DIR/parse-error.rs:126: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:126:30
--> $DIR/parse-error.rs:128: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:128:13
--> $DIR/parse-error.rs:130:13
|
LL | global_asm!(format!("{{{}}}", 0), const FOO);
| ^^^^^^^^^^^^^^^^^^^^
@ -371,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:130:20
--> $DIR/parse-error.rs:132:20
|
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
| ^^^^^^^^^^^^^^^^^^^^
@ -379,7 +379,7 @@ 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:37:37
--> $DIR/parse-error.rs:39:37
|
LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo`
@ -388,7 +388,7 @@ LL | asm!("{}", options(), const foo);
| ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/parse-error.rs:46:44
--> $DIR/parse-error.rs:48:44
|
LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo`
@ -397,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:53:31
--> $DIR/parse-error.rs:55:31
|
LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo`
@ -406,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:53:46
--> $DIR/parse-error.rs:55:46
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -415,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:60:45
--> $DIR/parse-error.rs:62:45
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -424,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:63:45
--> $DIR/parse-error.rs:65:45
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`
@ -433,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:66:41
--> $DIR/parse-error.rs:68:41
|
LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar`

View File

@ -1,5 +1,5 @@
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:10:15
--> $DIR/srcloc.rs:11:15
|
LL | asm!("invalid_instruction");
| ^
@ -11,7 +11,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:14:13
--> $DIR/srcloc.rs:15:13
|
LL | invalid_instruction
| ^
@ -23,7 +23,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:19:13
--> $DIR/srcloc.rs:20:13
|
LL | invalid_instruction
| ^
@ -35,7 +35,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:25:13
--> $DIR/srcloc.rs:26:13
|
LL | invalid_instruction
| ^
@ -47,7 +47,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:32:13
--> $DIR/srcloc.rs:33:13
|
LL | invalid_instruction
| ^
@ -59,7 +59,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:37:14
--> $DIR/srcloc.rs:38:14
|
LL | asm!(concat!("invalid", "_", "instruction"));
| ^
@ -71,7 +71,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:41:14
--> $DIR/srcloc.rs:42:14
|
LL | "invalid_instruction",
| ^
@ -83,7 +83,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:47:14
--> $DIR/srcloc.rs:48:14
|
LL | "invalid_instruction",
| ^
@ -95,7 +95,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:54:14
--> $DIR/srcloc.rs:55:14
|
LL | "invalid_instruction",
| ^
@ -107,7 +107,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:61:13
--> $DIR/srcloc.rs:62:13
|
LL | concat!("invalid", "_", "instruction"),
| ^
@ -119,7 +119,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:68:13
--> $DIR/srcloc.rs:69:13
|
LL | concat!("invalid", "_", "instruction"),
| ^
@ -131,7 +131,7 @@ LL | invalid_instruction
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:75:14
--> $DIR/srcloc.rs:76:14
|
LL | "invalid_instruction1",
| ^
@ -143,7 +143,7 @@ LL | invalid_instruction1
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:76:14
--> $DIR/srcloc.rs:77:14
|
LL | "invalid_instruction2",
| ^
@ -155,7 +155,7 @@ LL | invalid_instruction2
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:82:13
--> $DIR/srcloc.rs:83:13
|
LL | concat!(
| ^
@ -167,7 +167,7 @@ LL | invalid_instruction1
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:82:13
--> $DIR/srcloc.rs:83:13
|
LL | concat!(
| ^
@ -179,7 +179,7 @@ LL | invalid_instruction2
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:91:13
--> $DIR/srcloc.rs:92:13
|
LL | concat!(
| ^
@ -191,7 +191,7 @@ LL | invalid_instruction1
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:91:13
--> $DIR/srcloc.rs:92:13
|
LL | concat!(
| ^
@ -203,7 +203,7 @@ LL | invalid_instruction2
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:95:13
--> $DIR/srcloc.rs:96:13
|
LL | concat!(
| ^
@ -215,7 +215,7 @@ LL | invalid_instruction3
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:95:13
--> $DIR/srcloc.rs:96:13
|
LL | concat!(
| ^
@ -227,7 +227,7 @@ LL | invalid_instruction4
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:106:13
--> $DIR/srcloc.rs:107:13
|
LL | concat!(
| ^
@ -239,7 +239,7 @@ LL | invalid_instruction1
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:106:13
--> $DIR/srcloc.rs:107:13
|
LL | concat!(
| ^
@ -251,7 +251,7 @@ LL | invalid_instruction2
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:110:13
--> $DIR/srcloc.rs:111:13
|
LL | concat!(
| ^
@ -263,7 +263,7 @@ LL | invalid_instruction3
| ^
error: unrecognized instruction mnemonic
--> $DIR/srcloc.rs:110:13
--> $DIR/srcloc.rs:111:13
|
LL | concat!(
| ^

View File

@ -1,13 +1,13 @@
error: arguments for inline assembly must be copyable
--> $DIR/type-check-2.rs:46:31
--> $DIR/type-check-2.rs:48:31
|
LL | asm!("{:v}", in(vreg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `SimdNonCopy` does not implement the Copy trait
error: cannot use value of type `[closure@$DIR/type-check-2.rs:58:28: 58:38]` for inline assembly
--> $DIR/type-check-2.rs:58:28
error: cannot use value of type `[closure@$DIR/type-check-2.rs:60:28: 60:38]` for inline assembly
--> $DIR/type-check-2.rs:60:28
|
LL | asm!("{}", in(reg) |x: i32| x);
| ^^^^^^^^^^
@ -15,7 +15,7 @@ LL | asm!("{}", in(reg) |x: i32| x);
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `Vec<i32>` for inline assembly
--> $DIR/type-check-2.rs:60:28
--> $DIR/type-check-2.rs:62:28
|
LL | asm!("{}", in(reg) vec![0]);
| ^^^^^^^
@ -24,7 +24,7 @@ LL | asm!("{}", in(reg) vec![0]);
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot use value of type `(i32, i32, i32)` for inline assembly
--> $DIR/type-check-2.rs:62:28
--> $DIR/type-check-2.rs:64:28
|
LL | asm!("{}", in(reg) (1, 2, 3));
| ^^^^^^^^^
@ -32,7 +32,7 @@ LL | asm!("{}", in(reg) (1, 2, 3));
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `[i32; 3]` for inline assembly
--> $DIR/type-check-2.rs:64:28
--> $DIR/type-check-2.rs:66:28
|
LL | asm!("{}", in(reg) [1, 2, 3]);
| ^^^^^^^^^
@ -40,7 +40,7 @@ LL | asm!("{}", in(reg) [1, 2, 3]);
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `fn() {main}` for inline assembly
--> $DIR/type-check-2.rs:72:31
--> $DIR/type-check-2.rs:74:31
|
LL | asm!("{}", inout(reg) f);
| ^
@ -48,7 +48,7 @@ LL | asm!("{}", inout(reg) f);
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `&mut i32` for inline assembly
--> $DIR/type-check-2.rs:75:31
--> $DIR/type-check-2.rs:77:31
|
LL | asm!("{}", inout(reg) r);
| ^
@ -56,31 +56,31 @@ LL | asm!("{}", inout(reg) r);
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: asm `sym` operand must point to a fn or static
--> $DIR/type-check-2.rs:39:24
--> $DIR/type-check-2.rs:41:24
|
LL | asm!("{}", sym C);
| ^
error: asm `sym` operand must point to a fn or static
--> $DIR/type-check-2.rs:41:24
--> $DIR/type-check-2.rs:43:24
|
LL | asm!("{}", sym x);
| ^
error[E0381]: use of possibly-uninitialized variable: `x`
--> $DIR/type-check-2.rs:17:28
--> $DIR/type-check-2.rs:19:28
|
LL | asm!("{}", in(reg) x);
| ^ use of possibly-uninitialized `x`
error[E0381]: use of possibly-uninitialized variable: `y`
--> $DIR/type-check-2.rs:20:9
--> $DIR/type-check-2.rs:22:9
|
LL | asm!("{}", inout(reg) y);
| ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
--> $DIR/type-check-2.rs:28:29
--> $DIR/type-check-2.rs:30:29
|
LL | let v: Vec<u64> = vec![0, 1, 2];
| - help: consider changing this to be mutable: `mut v`
@ -89,7 +89,7 @@ LL | asm!("{}", out(reg) v[0]);
| ^ cannot borrow as mutable
error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
--> $DIR/type-check-2.rs:30:31
--> $DIR/type-check-2.rs:32:31
|
LL | let v: Vec<u64> = vec![0, 1, 2];
| - help: consider changing this to be mutable: `mut v`

View File

@ -1,5 +1,5 @@
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:47:15
--> $DIR/type-check-3.rs:48:15
|
LL | asm!("{}", in(reg) 0u8);
| ^^ --- for this argument
@ -9,7 +9,7 @@ LL | asm!("{}", in(reg) 0u8);
= help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:49:15
--> $DIR/type-check-3.rs:50:15
|
LL | asm!("{}", in(reg) 0u16);
| ^^ ---- for this argument
@ -18,7 +18,7 @@ LL | asm!("{}", in(reg) 0u16);
= help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:51:15
--> $DIR/type-check-3.rs:52:15
|
LL | asm!("{}", in(reg) 0i32);
| ^^ ---- for this argument
@ -27,7 +27,7 @@ LL | asm!("{}", in(reg) 0i32);
= help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:53:15
--> $DIR/type-check-3.rs:54:15
|
LL | asm!("{}", in(reg) 0f32);
| ^^ ---- for this argument
@ -36,7 +36,7 @@ LL | asm!("{}", in(reg) 0f32);
= help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:56:15
--> $DIR/type-check-3.rs:57:15
|
LL | asm!("{}", in(vreg) 0i16);
| ^^ ---- for this argument
@ -45,7 +45,7 @@ LL | asm!("{}", in(vreg) 0i16);
= help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:58:15
--> $DIR/type-check-3.rs:59:15
|
LL | asm!("{}", in(vreg) 0f32);
| ^^ ---- for this argument
@ -54,7 +54,7 @@ LL | asm!("{}", in(vreg) 0f32);
= help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:60:15
--> $DIR/type-check-3.rs:61:15
|
LL | asm!("{}", in(vreg) 0f64);
| ^^ ---- for this argument
@ -63,7 +63,7 @@ LL | asm!("{}", in(vreg) 0f64);
= help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:62:15
--> $DIR/type-check-3.rs:63:15
|
LL | asm!("{}", in(vreg_low16) 0f64);
| ^^ ---- for this argument
@ -72,7 +72,7 @@ LL | asm!("{}", in(vreg_low16) 0f64);
= help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:65:15
--> $DIR/type-check-3.rs:66:15
|
LL | asm!("{0} {0}", in(reg) 0i16);
| ^^^ ^^^ ---- for this argument
@ -81,7 +81,7 @@ LL | asm!("{0} {0}", in(reg) 0i16);
= help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument
--> $DIR/type-check-3.rs:67:15
--> $DIR/type-check-3.rs:68:15
|
LL | asm!("{0} {0:x}", in(reg) 0i16);
| ^^^ ---- for this argument
@ -90,7 +90,7 @@ LL | asm!("{0} {0:x}", in(reg) 0i16);
= help: or use the `x` modifier to keep the default formatting of `x0`
error: type `i128` cannot be used with this register class
--> $DIR/type-check-3.rs:72:28
--> $DIR/type-check-3.rs:73:28
|
LL | asm!("{}", in(reg) 0i128);
| ^^^^^
@ -98,7 +98,7 @@ LL | asm!("{}", in(reg) 0i128);
= note: register class `reg` supports these types: i8, i16, i32, i64, f32, f64
error: type `float64x2_t` cannot be used with this register class
--> $DIR/type-check-3.rs:74:28
--> $DIR/type-check-3.rs:75:28
|
LL | asm!("{}", in(reg) f64x2);
| ^^^^^
@ -106,7 +106,7 @@ LL | asm!("{}", in(reg) f64x2);
= note: register class `reg` supports these types: i8, i16, i32, i64, f32, f64
error: type `Simd256bit` cannot be used with this register class
--> $DIR/type-check-3.rs:76:29
--> $DIR/type-check-3.rs:77:29
|
LL | asm!("{}", in(vreg) f64x4);
| ^^^^^
@ -114,7 +114,7 @@ LL | asm!("{}", in(vreg) f64x4);
= note: register class `vreg` supports these types: i8, i16, i32, i64, f32, f64, i8x8, i16x4, i32x2, i64x1, f32x2, f64x1, i8x16, i16x8, i32x4, i64x2, f32x4, f64x2
error: incompatible types for asm inout argument
--> $DIR/type-check-3.rs:87:33
--> $DIR/type-check-3.rs:88:33
|
LL | asm!("{:x}", inout(reg) 0u32 => val_f32);
| ^^^^ ^^^^^^^ type `f32`
@ -124,7 +124,7 @@ LL | asm!("{:x}", inout(reg) 0u32 => val_f32);
= note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
error: incompatible types for asm inout argument
--> $DIR/type-check-3.rs:89:33
--> $DIR/type-check-3.rs:90:33
|
LL | asm!("{:x}", inout(reg) 0u32 => val_ptr);
| ^^^^ ^^^^^^^ type `*mut u8`
@ -134,7 +134,7 @@ LL | asm!("{:x}", inout(reg) 0u32 => val_ptr);
= note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
error: incompatible types for asm inout argument
--> $DIR/type-check-3.rs:91:33
--> $DIR/type-check-3.rs:92:33
|
LL | asm!("{:x}", inout(reg) main => val_u32);
| ^^^^ ^^^^^^^ type `u32`
@ -144,7 +144,7 @@ LL | asm!("{:x}", inout(reg) main => val_u32);
= note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
error[E0013]: constants cannot refer to statics
--> $DIR/type-check-3.rs:107:25
--> $DIR/type-check-3.rs:108:25
|
LL | global_asm!("{}", const S);
| ^
@ -152,7 +152,7 @@ LL | global_asm!("{}", const S);
= help: consider extracting the value of the `static` to a `const`, and referring to that
error[E0013]: constants cannot refer to statics
--> $DIR/type-check-3.rs:110:35
--> $DIR/type-check-3.rs:111:35
|
LL | global_asm!("{}", const const_foo(S));
| ^
@ -160,7 +160,7 @@ LL | global_asm!("{}", const const_foo(S));
= help: consider extracting the value of the `static` to a `const`, and referring to that
error[E0013]: constants cannot refer to statics
--> $DIR/type-check-3.rs:113:35
--> $DIR/type-check-3.rs:114:35
|
LL | global_asm!("{}", const const_bar(S));
| ^

View File

@ -1,5 +1,5 @@
error: unused variable: `a`
--> $DIR/naked-functions-unused.rs:15:32
--> $DIR/naked-functions-unused.rs:16:32
|
LL | pub extern "C" fn function(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
@ -12,55 +12,55 @@ LL | #![deny(unused)]
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
error: unused variable: `b`
--> $DIR/naked-functions-unused.rs:15:42
--> $DIR/naked-functions-unused.rs:16:42
|
LL | pub extern "C" fn function(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a`
--> $DIR/naked-functions-unused.rs:24:38
--> $DIR/naked-functions-unused.rs:25:38
|
LL | pub extern "C" fn associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b`
--> $DIR/naked-functions-unused.rs:24:48
--> $DIR/naked-functions-unused.rs:25:48
|
LL | pub extern "C" fn associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a`
--> $DIR/naked-functions-unused.rs:30:41
--> $DIR/naked-functions-unused.rs:31:41
|
LL | pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b`
--> $DIR/naked-functions-unused.rs:30:51
--> $DIR/naked-functions-unused.rs:31:51
|
LL | pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a`
--> $DIR/naked-functions-unused.rs:38:40
--> $DIR/naked-functions-unused.rs:39:40
|
LL | extern "C" fn trait_associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b`
--> $DIR/naked-functions-unused.rs:38:50
--> $DIR/naked-functions-unused.rs:39:50
|
LL | extern "C" fn trait_associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a`
--> $DIR/naked-functions-unused.rs:44:43
--> $DIR/naked-functions-unused.rs:45:43
|
LL | extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b`
--> $DIR/naked-functions-unused.rs:44:53
--> $DIR/naked-functions-unused.rs:45:53
|
LL | extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`