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 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); LL | asm!("{}", in(foo) foo);
| ^^^^^^^^^^^ | ^^^^^^^^^^^
error: invalid register `foo`: unknown register error: invalid register `foo`: unknown register
--> $DIR/bad-reg.rs:14:18 --> $DIR/bad-reg.rs:16:18
| |
LL | asm!("", in("foo") foo); LL | asm!("", in("foo") foo);
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: invalid asm template modifier for this register class 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); LL | asm!("{:z}", in(reg) foo);
| ^^^^ ----------- argument | ^^^^ ----------- argument
@ -21,7 +21,7 @@ LL | asm!("{:z}", in(reg) foo);
= note: the `reg` register class supports the following template modifiers: `w`, `x` = note: the `reg` register class supports the following template modifiers: `w`, `x`
error: invalid asm template modifier for this register class 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); LL | asm!("{:r}", in(vreg) foo);
| ^^^^ ------------ argument | ^^^^ ------------ 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` = 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 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); LL | asm!("{:r}", in(vreg_low16) foo);
| ^^^^ ------------------ argument | ^^^^ ------------------ 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` = 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 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); LL | asm!("{:a}", const 0);
| ^^^^ ------- argument | ^^^^ ------- argument
@ -49,7 +49,7 @@ LL | asm!("{:a}", const 0);
| template modifier | template modifier
error: asm template modifiers are not allowed for `sym` arguments 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); LL | asm!("{:a}", sym main);
| ^^^^ -------- argument | ^^^^ -------- argument
@ -57,49 +57,49 @@ LL | asm!("{:a}", sym main);
| template modifier | template modifier
error: invalid register `x29`: the frame pointer cannot be used as an operand for inline asm 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); LL | asm!("", in("x29") foo);
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm 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); LL | asm!("", in("sp") foo);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: invalid register `xzr`: the zero register cannot be used as an operand for inline asm 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); 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 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); LL | asm!("", in("x19") foo);
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output 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); LL | asm!("", in("p0") foo);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output 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); LL | asm!("{}", in(preg) foo);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: register class `preg` can only be used as a clobber, not as an input or output 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) _); LL | asm!("{}", out(preg) _);
| ^^^^^^^^^^^ | ^^^^^^^^^^^
error: register `x0` conflicts with register `x0` 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); LL | asm!("", in("x0") foo, in("w0") bar);
| ------------ ^^^^^^^^^^^^ register `x0` | ------------ ^^^^^^^^^^^^ register `x0`
@ -107,7 +107,7 @@ LL | asm!("", in("x0") foo, in("w0") bar);
| register `x0` | register `x0`
error: register `x0` conflicts with 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); LL | asm!("", in("x0") foo, out("x0") bar);
| ------------ ^^^^^^^^^^^^^ register `x0` | ------------ ^^^^^^^^^^^^^ register `x0`
@ -115,13 +115,13 @@ LL | asm!("", in("x0") foo, out("x0") bar);
| register `x0` | register `x0`
| |
help: use `lateout` instead of `out` to avoid conflict 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); LL | asm!("", in("x0") foo, out("x0") bar);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: register `v0` conflicts with register `v0` 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); LL | asm!("", in("v0") foo, in("q0") bar);
| ------------ ^^^^^^^^^^^^ register `v0` | ------------ ^^^^^^^^^^^^ register `v0`
@ -129,7 +129,7 @@ LL | asm!("", in("v0") foo, in("q0") bar);
| register `v0` | register `v0`
error: register `v0` conflicts with 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); LL | asm!("", in("v0") foo, out("q0") bar);
| ------------ ^^^^^^^^^^^^^ register `v0` | ------------ ^^^^^^^^^^^^^ register `v0`
@ -137,7 +137,7 @@ LL | asm!("", in("v0") foo, out("q0") bar);
| register `v0` | register `v0`
| |
help: use `lateout` instead of `out` to avoid conflict 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); LL | asm!("", in("v0") foo, out("q0") bar);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View file

@ -1,6 +1,8 @@
// only-aarch64 // only-aarch64
// run-rustfix // run-rustfix
use std::arch::asm;
fn main() { fn main() {
unsafe { unsafe {
asm!("", options(nomem, )); asm!("", options(nomem, ));
@ -17,8 +19,8 @@ fn main() {
"", "",
options(nomem, noreturn), options(nomem, noreturn),
options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
options( nostack), //~ ERROR the `nomem` option was already provided options( nostack), //~ ERROR the `nomem` option was already provided
options(), //~ ERROR the `noreturn` 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 error: requires at least a template string argument
--> $DIR/parse-error.rs:9:9 --> $DIR/parse-error.rs:11:9
| |
LL | asm!(); LL | asm!();
| ^^^^^^ | ^^^^^^
error: asm template must be a string literal error: asm template must be a string literal
--> $DIR/parse-error.rs:11:14 --> $DIR/parse-error.rs:13:14
| |
LL | asm!(foo); LL | asm!(foo);
| ^^^ | ^^^
error: expected token: `,` error: expected token: `,`
--> $DIR/parse-error.rs:13:19 --> $DIR/parse-error.rs:15:19
| |
LL | asm!("{}" foo); LL | asm!("{}" foo);
| ^^^ expected `,` | ^^^ expected `,`
error: expected operand, clobber_abi, options, or additional template string 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); LL | asm!("{}", foo);
| ^^^ expected operand, clobber_abi, options, or additional template string | ^^^ expected operand, clobber_abi, options, or additional template string
error: expected `(`, found `foo` error: expected `(`, found `foo`
--> $DIR/parse-error.rs:17:23 --> $DIR/parse-error.rs:19:23
| |
LL | asm!("{}", in foo); LL | asm!("{}", in foo);
| ^^^ expected `(` | ^^^ expected `(`
error: expected `)`, found `foo` error: expected `)`, found `foo`
--> $DIR/parse-error.rs:19:27 --> $DIR/parse-error.rs:21:27
| |
LL | asm!("{}", in(reg foo)); LL | asm!("{}", in(reg foo));
| ^^^ expected `)` | ^^^ expected `)`
error: expected expression, found end of macro arguments error: expected expression, found end of macro arguments
--> $DIR/parse-error.rs:21:27 --> $DIR/parse-error.rs:23:27
| |
LL | asm!("{}", in(reg)); LL | asm!("{}", in(reg));
| ^ expected expression | ^ expected expression
error: expected register class or explicit register error: expected register class or explicit register
--> $DIR/parse-error.rs:23:26 --> $DIR/parse-error.rs:25:26
| |
LL | asm!("{}", inout(=) foo => bar); LL | asm!("{}", inout(=) foo => bar);
| ^ | ^
error: expected expression, found end of macro arguments 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 =>); LL | asm!("{}", inout(reg) foo =>);
| ^ expected expression | ^ expected expression
error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>` 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); LL | asm!("{}", in(reg) foo => bar);
| ^^ expected one of 7 possible tokens | ^^ expected one of 7 possible tokens
error: argument to `sym` must be a path expression 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); LL | asm!("{}", sym foo + bar);
| ^^^^^^^^^ | ^^^^^^^^^
error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` 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)); LL | asm!("", options(foo));
| ^^^ expected one of 10 possible tokens | ^^^ expected one of 10 possible tokens
error: expected one of `)` or `,`, found `foo` error: expected one of `)` or `,`, found `foo`
--> $DIR/parse-error.rs:33:32 --> $DIR/parse-error.rs:35:32
| |
LL | asm!("", options(nomem foo)); LL | asm!("", options(nomem foo));
| ^^^ expected one of `)` or `,` | ^^^ expected one of `)` or `,`
error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` 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)); LL | asm!("", options(nomem, foo));
| ^^^ expected one of 10 possible tokens | ^^^ expected one of 10 possible tokens
error: arguments are not allowed after options error: arguments are not allowed after options
--> $DIR/parse-error.rs:37:31 --> $DIR/parse-error.rs:39:31
| |
LL | asm!("{}", options(), const foo); LL | asm!("{}", options(), const foo);
| --------- ^^^^^^^^^ argument | --------- ^^^^^^^^^ argument
@ -91,25 +91,25 @@ LL | asm!("{}", options(), const foo);
| previous options | previous options
error: expected string literal error: expected string literal
--> $DIR/parse-error.rs:40:30 --> $DIR/parse-error.rs:42:30
| |
LL | asm!("", clobber_abi(foo)); LL | asm!("", clobber_abi(foo));
| ^^^ not a string literal | ^^^ not a string literal
error: expected one of `)` or `,`, found `foo` 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)); LL | asm!("", clobber_abi("C" foo));
| ^^^ expected one of `)` or `,` | ^^^ expected one of `)` or `,`
error: expected string literal error: expected string literal
--> $DIR/parse-error.rs:44:35 --> $DIR/parse-error.rs:46:35
| |
LL | asm!("", clobber_abi("C", foo)); LL | asm!("", clobber_abi("C", foo));
| ^^^ not a string literal | ^^^ not a string literal
error: arguments are not allowed after clobber_abi 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); LL | asm!("{}", clobber_abi("C"), const foo);
| ---------------- ^^^^^^^^^ argument | ---------------- ^^^^^^^^^ argument
@ -117,7 +117,7 @@ LL | asm!("{}", clobber_abi("C"), const foo);
| clobber_abi | clobber_abi
error: clobber_abi is not allowed after options 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")); LL | asm!("", options(), clobber_abi("C"));
| --------- ^^^^^^^^^^^^^^^^ | --------- ^^^^^^^^^^^^^^^^
@ -125,7 +125,7 @@ LL | asm!("", options(), clobber_abi("C"));
| options | options
error: clobber_abi is not allowed after 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); LL | asm!("{}", options(), clobber_abi("C"), const foo);
| --------- ^^^^^^^^^^^^^^^^ | --------- ^^^^^^^^^^^^^^^^
@ -133,7 +133,7 @@ LL | asm!("{}", options(), clobber_abi("C"), const foo);
| options | options
error: duplicate argument named `a` 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); LL | asm!("{a}", a = const foo, a = const bar);
| ------------- ^^^^^^^^^^^^^ duplicate argument | ------------- ^^^^^^^^^^^^^ duplicate argument
@ -141,7 +141,7 @@ LL | asm!("{a}", a = const foo, a = const bar);
| previously here | previously here
error: argument never used 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); LL | asm!("{a}", a = const foo, a = const bar);
| ^^^^^^^^^^^^^ argument never used | ^^^^^^^^^^^^^ 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} */"` = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
error: explicit register arguments cannot have names 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); LL | asm!("", a = in("x0") foo);
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
error: named arguments cannot follow explicit register arguments 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); LL | asm!("{a}", in("x0") foo, a = const bar);
| ------------ ^^^^^^^^^^^^^ named argument | ------------ ^^^^^^^^^^^^^ named argument
@ -163,7 +163,7 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
| explicit register argument | explicit register argument
error: named arguments cannot follow explicit register arguments 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); LL | asm!("{a}", in("x0") foo, a = const bar);
| ------------ ^^^^^^^^^^^^^ named argument | ------------ ^^^^^^^^^^^^^ named argument
@ -171,7 +171,7 @@ LL | asm!("{a}", in("x0") foo, a = const bar);
| explicit register argument | explicit register argument
error: positional arguments cannot follow named arguments or explicit register arguments 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); LL | asm!("{1}", in("x0") foo, const bar);
| ------------ ^^^^^^^^^ positional argument | ------------ ^^^^^^^^^ positional argument
@ -179,19 +179,19 @@ LL | asm!("{1}", in("x0") foo, const bar);
| explicit register argument | explicit register argument
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""` 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(), ""); LL | asm!("", options(), "");
| ^^ expected one of 9 possible tokens | ^^ expected one of 9 possible tokens
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"` 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); LL | asm!("{}", in(reg) foo, "{}", out(reg) foo);
| ^^^^ expected one of 9 possible tokens | ^^^^ expected one of 9 possible tokens
error: asm template must be a string literal 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); 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) = 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 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); 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) = 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 error: _ cannot be used for input operands
--> $DIR/parse-error.rs:77:28 --> $DIR/parse-error.rs:79:28
| |
LL | asm!("{}", in(reg) _); LL | asm!("{}", in(reg) _);
| ^ | ^
error: _ cannot be used for input operands error: _ cannot be used for input operands
--> $DIR/parse-error.rs:79:31 --> $DIR/parse-error.rs:81:31
| |
LL | asm!("{}", inout(reg) _); LL | asm!("{}", inout(reg) _);
| ^ | ^
error: _ cannot be used for input operands error: _ cannot be used for input operands
--> $DIR/parse-error.rs:81:35 --> $DIR/parse-error.rs:83:35
| |
LL | asm!("{}", inlateout(reg) _); LL | asm!("{}", inlateout(reg) _);
| ^ | ^
error: requires at least a template string argument error: requires at least a template string argument
--> $DIR/parse-error.rs:88:1 --> $DIR/parse-error.rs:90:1
| |
LL | global_asm!(); LL | global_asm!();
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: asm template must be a string literal error: asm template must be a string literal
--> $DIR/parse-error.rs:90:13 --> $DIR/parse-error.rs:92:13
| |
LL | global_asm!(FOO); LL | global_asm!(FOO);
| ^^^ | ^^^
error: expected token: `,` error: expected token: `,`
--> $DIR/parse-error.rs:92:18 --> $DIR/parse-error.rs:94:18
| |
LL | global_asm!("{}" FOO); LL | global_asm!("{}" FOO);
| ^^^ expected `,` | ^^^ expected `,`
error: expected operand, options, or additional template string error: expected operand, options, or additional template string
--> $DIR/parse-error.rs:94:19 --> $DIR/parse-error.rs:96:19
| |
LL | global_asm!("{}", FOO); LL | global_asm!("{}", FOO);
| ^^^ expected operand, options, or additional template string | ^^^ expected operand, options, or additional template string
error: expected expression, found end of macro arguments error: expected expression, found end of macro arguments
--> $DIR/parse-error.rs:96:24 --> $DIR/parse-error.rs:98:24
| |
LL | global_asm!("{}", const); LL | global_asm!("{}", const);
| ^ expected expression | ^ expected expression
error: expected one of `,`, `.`, `?`, or an operator, found `FOO` 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); LL | global_asm!("{}", const(reg) FOO);
| ^^^ expected one of `,`, `.`, `?`, or an operator | ^^^ expected one of `,`, `.`, `?`, or an operator
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `FOO` 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)); LL | global_asm!("", options(FOO));
| ^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw` | ^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem` 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)); LL | global_asm!("", options(nomem FOO));
| ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw` | ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem` 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)); LL | global_asm!("", options(nomem, FOO));
| ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw` | ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
error: arguments are not allowed after options 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); LL | global_asm!("{}", options(), const FOO);
| --------- ^^^^^^^^^ argument | --------- ^^^^^^^^^ argument
@ -287,25 +287,25 @@ LL | global_asm!("{}", options(), const FOO);
| previous options | previous options
error: expected string literal error: expected string literal
--> $DIR/parse-error.rs:108:29 --> $DIR/parse-error.rs:110:29
| |
LL | global_asm!("", clobber_abi(FOO)); LL | global_asm!("", clobber_abi(FOO));
| ^^^ not a string literal | ^^^ not a string literal
error: expected one of `)` or `,`, found `FOO` 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)); LL | global_asm!("", clobber_abi("C" FOO));
| ^^^ expected one of `)` or `,` | ^^^ expected one of `)` or `,`
error: expected string literal error: expected string literal
--> $DIR/parse-error.rs:112:34 --> $DIR/parse-error.rs:114:34
| |
LL | global_asm!("", clobber_abi("C", FOO)); LL | global_asm!("", clobber_abi("C", FOO));
| ^^^ not a string literal | ^^^ not a string literal
error: arguments are not allowed after clobber_abi 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); LL | global_asm!("{}", clobber_abi("C"), const FOO);
| ---------------- ^^^^^^^^^ argument | ---------------- ^^^^^^^^^ argument
@ -313,13 +313,13 @@ LL | global_asm!("{}", clobber_abi("C"), const FOO);
| clobber_abi | clobber_abi
error: `clobber_abi` cannot be used with `global_asm!` 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); LL | global_asm!("{}", clobber_abi("C"), const FOO);
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
error: clobber_abi is not allowed after options 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")); LL | global_asm!("", options(), clobber_abi("C"));
| --------- ^^^^^^^^^^^^^^^^ | --------- ^^^^^^^^^^^^^^^^
@ -327,7 +327,7 @@ LL | global_asm!("", options(), clobber_abi("C"));
| options | options
error: clobber_abi is not allowed after 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); LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| --------- ^^^^^^^^^^^^^^^^ | --------- ^^^^^^^^^^^^^^^^
@ -335,7 +335,7 @@ LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| options | options
error: duplicate argument named `a` 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); LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ------------- ^^^^^^^^^^^^^ duplicate argument | ------------- ^^^^^^^^^^^^^ duplicate argument
@ -343,7 +343,7 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
| previously here | previously here
error: argument never used 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); LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ^^^^^^^^^^^^^ argument never used | ^^^^^^^^^^^^^ 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} */"` = 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 `""` 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(), ""); LL | global_asm!("", options(), "");
| ^^ expected one of `clobber_abi`, `const`, or `options` | ^^ expected one of `clobber_abi`, `const`, or `options`
error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"` 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); LL | global_asm!("{}", const FOO, "{}", const FOO);
| ^^^^ expected one of `clobber_abi`, `const`, or `options` | ^^^^ expected one of `clobber_abi`, `const`, or `options`
error: asm template must be a string literal 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); 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) = 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 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); 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) = 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 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; LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo` | ---------- help: consider using `const` instead of `let`: `const foo`
@ -388,7 +388,7 @@ LL | asm!("{}", options(), const foo);
| ^^^ non-constant value | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo` | ---------- help: consider using `const` instead of `let`: `const foo`
@ -397,7 +397,7 @@ LL | asm!("{}", clobber_abi("C"), const foo);
| ^^^ non-constant value | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut foo = 0;
| ---------- help: consider using `const` instead of `let`: `const foo` | ---------- 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 | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar` | ---------- 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 | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar` | ---------- 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 | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar` | ---------- 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 | ^^^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant 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; LL | let mut bar = 0;
| ---------- help: consider using `const` instead of `let`: `const bar` | ---------- help: consider using `const` instead of `let`: `const bar`

View file

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

View file

@ -1,13 +1,13 @@
error: arguments for inline assembly must be copyable 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)); LL | asm!("{:v}", in(vreg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
= note: `SimdNonCopy` does not implement the Copy trait = 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 error: cannot use value of type `[closure@$DIR/type-check-2.rs:60:28: 60:38]` for inline assembly
--> $DIR/type-check-2.rs:58:28 --> $DIR/type-check-2.rs:60:28
| |
LL | asm!("{}", in(reg) |x: i32| x); 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 = 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 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]); 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) = 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 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)); 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 = 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 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]); 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 = 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 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); 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 = 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 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); 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 = 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 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); LL | asm!("{}", sym C);
| ^ | ^
error: asm `sym` operand must point to a fn or static 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); LL | asm!("{}", sym x);
| ^ | ^
error[E0381]: use of possibly-uninitialized variable: `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); LL | asm!("{}", in(reg) x);
| ^ use of possibly-uninitialized `x` | ^ use of possibly-uninitialized `x`
error[E0381]: use of possibly-uninitialized variable: `y` 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); LL | asm!("{}", inout(reg) y);
| ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y` | ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable 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]; LL | let v: Vec<u64> = vec![0, 1, 2];
| - help: consider changing this to be mutable: `mut v` | - help: consider changing this to be mutable: `mut v`
@ -89,7 +89,7 @@ LL | asm!("{}", out(reg) v[0]);
| ^ cannot borrow as mutable | ^ cannot borrow as mutable
error[E0596]: cannot borrow `v` as mutable, as it is not declared 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]; LL | let v: Vec<u64> = vec![0, 1, 2];
| - help: consider changing this to be mutable: `mut v` | - 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 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); LL | asm!("{}", in(reg) 0u8);
| ^^ --- for this argument | ^^ --- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(reg) 0u16);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(reg) 0i32);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(reg) 0f32);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(vreg) 0i16);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(vreg) 0f32);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(vreg) 0f64);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{}", in(vreg_low16) 0f64);
| ^^ ---- for this argument | ^^ ---- 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` = help: or use the `v` modifier to keep the default formatting of `v0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{0} {0}", in(reg) 0i16);
| ^^^ ^^^ ---- for this argument | ^^^ ^^^ ---- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
warning: formatting may not be suitable for sub-register argument 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); LL | asm!("{0} {0:x}", in(reg) 0i16);
| ^^^ ---- for this argument | ^^^ ---- 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` = help: or use the `x` modifier to keep the default formatting of `x0`
error: type `i128` cannot be used with this register class 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); 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 = note: register class `reg` supports these types: i8, i16, i32, i64, f32, f64
error: type `float64x2_t` cannot be used with this register class 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); 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 = note: register class `reg` supports these types: i8, i16, i32, i64, f32, f64
error: type `Simd256bit` cannot be used with this register class 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); 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 = 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 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); LL | asm!("{:x}", inout(reg) 0u32 => val_f32);
| ^^^^ ^^^^^^^ type `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 = 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 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); LL | asm!("{:x}", inout(reg) 0u32 => val_ptr);
| ^^^^ ^^^^^^^ type `*mut u8` | ^^^^ ^^^^^^^ 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 = 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 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); LL | asm!("{:x}", inout(reg) main => val_u32);
| ^^^^ ^^^^^^^ type `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 = 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 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); 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 = help: consider extracting the value of the `static` to a `const`, and referring to that
error[E0013]: constants cannot refer to statics 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)); 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 = help: consider extracting the value of the `static` to a `const`, and referring to that
error[E0013]: constants cannot refer to statics 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)); LL | global_asm!("{}", const const_bar(S));
| ^ | ^

View file

@ -1,5 +1,5 @@
error: unused variable: `a` 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 { LL | pub extern "C" fn function(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a` | ^ 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)]` = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
error: unused variable: `b` 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 { LL | pub extern "C" fn function(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b` | ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a` 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 { LL | pub extern "C" fn associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a` | ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b` 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 { LL | pub extern "C" fn associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b` | ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a` 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 { LL | pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a` | ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b` 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 { LL | pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b` | ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a` 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 { LL | extern "C" fn trait_associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a` | ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b` 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 { LL | extern "C" fn trait_associated(a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b` | ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `a` 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 { LL | extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a` | ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b` 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 { LL | extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b` | ^ help: if this is intentional, prefix it with an underscore: `_b`