1 error: invalid reference to argument at index 0
2 --> $DIR/bad-template.rs:31:15
7 = note: no arguments were given
9 error: invalid reference to argument at index 1
10 --> $DIR/bad-template.rs:33:15
12 LL | asm!("{1}", in(reg) foo);
15 = note: there is 1 argument
17 error: argument never used
18 --> $DIR/bad-template.rs:33:21
20 LL | asm!("{1}", in(reg) foo);
21 | ^^^^^^^^^^^ argument never used
23 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
25 error: there is no argument named `a`
26 --> $DIR/bad-template.rs:36:16
31 error: invalid reference to argument at index 0
32 --> $DIR/bad-template.rs:38:15
34 LL | asm!("{}", a = in(reg) foo);
35 | ^^ --------------- named argument
39 = note: no positional arguments were given
40 note: named arguments cannot be referenced by position
41 --> $DIR/bad-template.rs:38:20
43 LL | asm!("{}", a = in(reg) foo);
46 error: named argument never used
47 --> $DIR/bad-template.rs:38:20
49 LL | asm!("{}", a = in(reg) foo);
50 | ^^^^^^^^^^^^^^^ named argument never used
52 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
54 error: invalid reference to argument at index 1
55 --> $DIR/bad-template.rs:41:15
57 LL | asm!("{1}", a = in(reg) foo);
60 = note: no positional arguments were given
62 error: named argument never used
63 --> $DIR/bad-template.rs:41:21
65 LL | asm!("{1}", a = in(reg) foo);
66 | ^^^^^^^^^^^^^^^ named argument never used
68 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
70 error: invalid reference to argument at index 0
71 --> $DIR/bad-template.rs:48:15
73 LL | asm!("{}", in("x0") foo);
74 | ^^ ------------ explicit register argument
78 = note: no positional arguments were given
79 note: explicit register arguments cannot be used in the asm template
80 --> $DIR/bad-template.rs:48:20
82 LL | asm!("{}", in("x0") foo);
85 error: asm template modifier must be a single character
86 --> $DIR/bad-template.rs:50:17
88 LL | asm!("{:foo}", in(reg) foo);
91 error: multiple unused asm arguments
92 --> $DIR/bad-template.rs:53:18
94 LL | asm!("", in(reg) 0, in(reg) 1);
95 | ^^^^^^^^^ ^^^^^^^^^ argument never used
99 = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
101 error: invalid reference to argument at index 0
102 --> $DIR/bad-template.rs:59:14
104 LL | global_asm!("{}");
107 = note: no arguments were given
109 error: invalid reference to argument at index 1
110 --> $DIR/bad-template.rs:61:14
112 LL | global_asm!("{1}", const FOO);
115 = note: there is 1 argument
117 error: argument never used
118 --> $DIR/bad-template.rs:61:20
120 LL | global_asm!("{1}", const FOO);
121 | ^^^^^^^^^ argument never used
123 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
125 error: there is no argument named `a`
126 --> $DIR/bad-template.rs:64:15
128 LL | global_asm!("{a}");
131 error: invalid reference to argument at index 0
132 --> $DIR/bad-template.rs:66:14
134 LL | global_asm!("{}", a = const FOO);
135 | ^^ ------------- named argument
139 = note: no positional arguments were given
140 note: named arguments cannot be referenced by position
141 --> $DIR/bad-template.rs:66:19
143 LL | global_asm!("{}", a = const FOO);
146 error: named argument never used
147 --> $DIR/bad-template.rs:66:19
149 LL | global_asm!("{}", a = const FOO);
150 | ^^^^^^^^^^^^^ named argument never used
152 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
154 error: invalid reference to argument at index 1
155 --> $DIR/bad-template.rs:69:14
157 LL | global_asm!("{1}", a = const FOO);
160 = note: no positional arguments were given
162 error: named argument never used
163 --> $DIR/bad-template.rs:69:20
165 LL | global_asm!("{1}", a = const FOO);
166 | ^^^^^^^^^^^^^ named argument never used
168 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
170 error: asm template modifier must be a single character
171 --> $DIR/bad-template.rs:72:16
173 LL | global_asm!("{:foo}", const FOO);
176 error: multiple unused asm arguments
177 --> $DIR/bad-template.rs:74:17
179 LL | global_asm!("", const FOO, const FOO);
180 | ^^^^^^^^^ ^^^^^^^^^ argument never used
182 | argument never used
184 = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
186 warning: formatting may not be suitable for sub-register argument
187 --> $DIR/bad-template.rs:50:15
189 LL | asm!("{:foo}", in(reg) foo);
190 | ^^^^^^ --- for this argument
192 = note: `#[warn(asm_sub_register)]` on by default
193 = help: use `{0:w}` to have the register formatted as `w0`
194 = help: or use `{0:x}` to keep the default formatting of `x0`
196 error: aborting due to 21 previous errors; 1 warning emitted