2020-02-20 03:19:48 -06:00
|
|
|
error: invalid reference to argument at index 0
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:30:15
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{}");
|
|
|
|
| ^^ from here
|
|
|
|
|
|
|
|
|
= note: no arguments were given
|
|
|
|
|
|
|
|
error: invalid reference to argument at index 1
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:32:15
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{1}", in(reg) foo);
|
|
|
|
| ^^^ from here
|
|
|
|
|
|
|
|
|
= note: there is 1 argument
|
|
|
|
|
|
|
|
error: argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:32:21
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{1}", in(reg) foo);
|
|
|
|
| ^^^^^^^^^^^ argument never used
|
2020-06-10 19:27:48 -05:00
|
|
|
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
error: there is no argument named `a`
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:35:16
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{a}");
|
2022-02-15 18:38:04 -06:00
|
|
|
| ^
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
error: invalid reference to argument at index 0
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:37:15
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
|
|
| ^^ --------------- named argument
|
|
|
|
| |
|
|
|
|
| from here
|
|
|
|
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
note: named arguments cannot be referenced by position
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:37:20
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: named argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:37:20
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{}", a = in(reg) foo);
|
|
|
|
| ^^^^^^^^^^^^^^^ named argument never used
|
2020-06-10 19:27:48 -05:00
|
|
|
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
error: invalid reference to argument at index 1
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:40:15
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{1}", a = in(reg) foo);
|
|
|
|
| ^^^ from here
|
|
|
|
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
|
|
|
|
error: named argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:40:21
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{1}", a = in(reg) foo);
|
|
|
|
| ^^^^^^^^^^^^^^^ named argument never used
|
2020-06-10 19:27:48 -05:00
|
|
|
|
|
|
|
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
error: invalid reference to argument at index 0
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:47:15
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
2021-06-24 09:01:49 -05:00
|
|
|
LL | asm!("{}", in("x0") foo);
|
|
|
|
| ^^ ------------ explicit register argument
|
2020-02-20 03:19:48 -06:00
|
|
|
| |
|
|
|
|
| from here
|
|
|
|
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
note: explicit register arguments cannot be used in the asm template
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:47:20
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
2021-06-24 09:01:49 -05:00
|
|
|
LL | asm!("{}", in("x0") foo);
|
|
|
|
| ^^^^^^^^^^^^
|
2022-12-15 22:20:34 -06:00
|
|
|
help: use the register name directly in the assembly code
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:47:20
|
2022-12-15 22:20:34 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{}", in("x0") foo);
|
|
|
|
| ^^^^^^^^^^^^
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
error: asm template modifier must be a single character
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:49:17
|
2020-02-20 03:19:48 -06:00
|
|
|
|
|
|
|
|
LL | asm!("{:foo}", in(reg) foo);
|
|
|
|
| ^^^
|
|
|
|
|
2020-06-10 19:27:48 -05:00
|
|
|
error: multiple unused asm arguments
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:52:18
|
2020-06-10 19:27:48 -05:00
|
|
|
|
|
|
|
|
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} */"`
|
|
|
|
|
2021-04-13 12:11:11 -05:00
|
|
|
error: invalid reference to argument at index 0
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:58:14
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{}");
|
|
|
|
| ^^ from here
|
|
|
|
|
|
|
|
|
= note: no arguments were given
|
|
|
|
|
|
|
|
error: invalid reference to argument at index 1
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:60:14
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{1}", const FOO);
|
|
|
|
| ^^^ from here
|
|
|
|
|
|
|
|
|
= note: there is 1 argument
|
|
|
|
|
|
|
|
error: argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:60:20
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
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`
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:63:15
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{a}");
|
2022-02-15 18:38:04 -06:00
|
|
|
| ^
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
error: invalid reference to argument at index 0
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:65:14
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{}", a = const FOO);
|
|
|
|
| ^^ ------------- named argument
|
|
|
|
| |
|
|
|
|
| from here
|
|
|
|
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
note: named arguments cannot be referenced by position
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:65:19
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{}", a = const FOO);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: named argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:65:19
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:68:14
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{1}", a = const FOO);
|
|
|
|
| ^^^ from here
|
|
|
|
|
|
|
|
|
= note: no positional arguments were given
|
|
|
|
|
|
|
|
error: named argument never used
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:68:20
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:71:16
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
LL | global_asm!("{:foo}", const FOO);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: multiple unused asm arguments
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:73:17
|
2021-04-13 12:11:11 -05:00
|
|
|
|
|
|
|
|
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} */"`
|
|
|
|
|
2022-04-14 07:07:36 -05:00
|
|
|
warning: formatting may not be suitable for sub-register argument
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/bad-template.rs:49:15
|
2022-04-14 07:07:36 -05:00
|
|
|
|
|
|
|
|
LL | asm!("{:foo}", in(reg) foo);
|
|
|
|
| ^^^^^^ --- for this argument
|
|
|
|
|
|
2024-03-03 08:10:06 -06:00
|
|
|
= help: use `{0:w}` to have the register formatted as `w0` (for 32-bit values)
|
|
|
|
= help: or use `{0:x}` to keep the default formatting of `x0` (for 64-bit values)
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(asm_sub_register)]` on by default
|
2022-04-14 07:07:36 -05:00
|
|
|
|
|
|
|
error: aborting due to 21 previous errors; 1 warning emitted
|
2020-02-20 03:19:48 -06:00
|
|
|
|