982b49494e
This is to make the diff when stabilizing it easier to review.
203 lines
6.0 KiB
Plaintext
203 lines
6.0 KiB
Plaintext
error: invalid reference to argument at index 0
|
|
--> $DIR/bad-template.rs:27:15
|
|
|
|
|
LL | asm!("{}");
|
|
| ^^ from here
|
|
|
|
|
= note: no arguments were given
|
|
|
|
error: invalid reference to argument at index 1
|
|
--> $DIR/bad-template.rs:29:15
|
|
|
|
|
LL | asm!("{1}", in(reg) foo);
|
|
| ^^^ from here
|
|
|
|
|
= note: there is 1 argument
|
|
|
|
error: argument never used
|
|
--> $DIR/bad-template.rs:29:21
|
|
|
|
|
LL | asm!("{1}", in(reg) foo);
|
|
| ^^^^^^^^^^^ argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
|
|
|
|
error: there is no argument named `a`
|
|
--> $DIR/bad-template.rs:32:16
|
|
|
|
|
LL | asm!("{a}");
|
|
| ^
|
|
|
|
error: invalid reference to argument at index 0
|
|
--> $DIR/bad-template.rs:34:15
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
| ^^ --------------- named argument
|
|
| |
|
|
| from here
|
|
|
|
|
= note: no positional arguments were given
|
|
note: named arguments cannot be referenced by position
|
|
--> $DIR/bad-template.rs:34:20
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: named argument never used
|
|
--> $DIR/bad-template.rs:34:20
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
| ^^^^^^^^^^^^^^^ named argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
|
|
|
error: invalid reference to argument at index 1
|
|
--> $DIR/bad-template.rs:37:15
|
|
|
|
|
LL | asm!("{1}", a = in(reg) foo);
|
|
| ^^^ from here
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
error: named argument never used
|
|
--> $DIR/bad-template.rs:37:21
|
|
|
|
|
LL | asm!("{1}", a = in(reg) foo);
|
|
| ^^^^^^^^^^^^^^^ named argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
|
|
|
error: invalid reference to argument at index 0
|
|
--> $DIR/bad-template.rs:41:15
|
|
|
|
|
LL | asm!("{}", in("eax") foo);
|
|
| ^^ ------------- explicit register argument
|
|
| |
|
|
| from here
|
|
|
|
|
= note: no positional arguments were given
|
|
note: explicit register arguments cannot be used in the asm template
|
|
--> $DIR/bad-template.rs:41:20
|
|
|
|
|
LL | asm!("{}", in("eax") foo);
|
|
| ^^^^^^^^^^^^^
|
|
help: use the register name directly in the assembly code
|
|
--> $DIR/bad-template.rs:41:20
|
|
|
|
|
LL | asm!("{}", in("eax") foo);
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: asm template modifier must be a single character
|
|
--> $DIR/bad-template.rs:46:17
|
|
|
|
|
LL | asm!("{:foo}", in(reg) foo);
|
|
| ^^^
|
|
|
|
error: multiple unused asm arguments
|
|
--> $DIR/bad-template.rs:49:18
|
|
|
|
|
LL | asm!("", in(reg) 0, in(reg) 1);
|
|
| ^^^^^^^^^ ^^^^^^^^^ argument never used
|
|
| |
|
|
| argument never used
|
|
|
|
|
= help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
|
|
|
|
error: invalid reference to argument at index 0
|
|
--> $DIR/bad-template.rs:55:14
|
|
|
|
|
LL | global_asm!("{}");
|
|
| ^^ from here
|
|
|
|
|
= note: no arguments were given
|
|
|
|
error: invalid reference to argument at index 1
|
|
--> $DIR/bad-template.rs:57:14
|
|
|
|
|
LL | global_asm!("{1}", const FOO);
|
|
| ^^^ from here
|
|
|
|
|
= note: there is 1 argument
|
|
|
|
error: argument never used
|
|
--> $DIR/bad-template.rs:57:20
|
|
|
|
|
LL | global_asm!("{1}", const FOO);
|
|
| ^^^^^^^^^ argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
|
|
|
|
error: there is no argument named `a`
|
|
--> $DIR/bad-template.rs:60:15
|
|
|
|
|
LL | global_asm!("{a}");
|
|
| ^
|
|
|
|
error: invalid reference to argument at index 0
|
|
--> $DIR/bad-template.rs:62:14
|
|
|
|
|
LL | global_asm!("{}", a = const FOO);
|
|
| ^^ ------------- named argument
|
|
| |
|
|
| from here
|
|
|
|
|
= note: no positional arguments were given
|
|
note: named arguments cannot be referenced by position
|
|
--> $DIR/bad-template.rs:62:19
|
|
|
|
|
LL | global_asm!("{}", a = const FOO);
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: named argument never used
|
|
--> $DIR/bad-template.rs:62:19
|
|
|
|
|
LL | global_asm!("{}", a = const FOO);
|
|
| ^^^^^^^^^^^^^ named argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
|
|
|
error: invalid reference to argument at index 1
|
|
--> $DIR/bad-template.rs:65:14
|
|
|
|
|
LL | global_asm!("{1}", a = const FOO);
|
|
| ^^^ from here
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
error: named argument never used
|
|
--> $DIR/bad-template.rs:65:20
|
|
|
|
|
LL | global_asm!("{1}", a = const FOO);
|
|
| ^^^^^^^^^^^^^ named argument never used
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
|
|
|
error: asm template modifier must be a single character
|
|
--> $DIR/bad-template.rs:68:16
|
|
|
|
|
LL | global_asm!("{:foo}", const FOO);
|
|
| ^^^
|
|
|
|
error: multiple unused asm arguments
|
|
--> $DIR/bad-template.rs:70:17
|
|
|
|
|
LL | global_asm!("", const FOO, const FOO);
|
|
| ^^^^^^^^^ ^^^^^^^^^ argument never used
|
|
| |
|
|
| argument never used
|
|
|
|
|
= help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
|
|
|
|
warning: formatting may not be suitable for sub-register argument
|
|
--> $DIR/bad-template.rs:46:15
|
|
|
|
|
LL | asm!("{:foo}", in(reg) foo);
|
|
| ^^^^^^ --- for this argument
|
|
|
|
|
= help: use `{0:e}` to have the register formatted as `eax`
|
|
= help: or use `{0:r}` to keep the default formatting of `rax`
|
|
= note: `#[warn(asm_sub_register)]` on by default
|
|
|
|
error: aborting due to 21 previous errors; 1 warning emitted
|
|
|