@@ -98,5 +98,90 @@ LL | asm!("", in(reg) 0, in(reg) 1);
9898 |
9999 = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
100100
101- error: aborting due to 11 previous errors
101+ error: invalid reference to argument at index 0
102+ --> $DIR/bad-template.rs:31:14
103+ |
104+ LL | global_asm!("{}");
105+ | ^^ from here
106+ |
107+ = note: no arguments were given
108+
109+ error: invalid reference to argument at index 1
110+ --> $DIR/bad-template.rs:33:14
111+ |
112+ LL | global_asm!("{1}", const FOO);
113+ | ^^^ from here
114+ |
115+ = note: there is 1 argument
116+
117+ error: argument never used
118+ --> $DIR/bad-template.rs:33:20
119+ |
120+ LL | global_asm!("{1}", const FOO);
121+ | ^^^^^^^^^ argument never used
122+ |
123+ = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
124+
125+ error: there is no argument named `a`
126+ --> $DIR/bad-template.rs:36:14
127+ |
128+ LL | global_asm!("{a}");
129+ | ^^^
130+
131+ error: invalid reference to argument at index 0
132+ --> $DIR/bad-template.rs:38:14
133+ |
134+ LL | global_asm!("{}", a = const FOO);
135+ | ^^ ------------- named argument
136+ | |
137+ | from here
138+ |
139+ = note: no positional arguments were given
140+ note: named arguments cannot be referenced by position
141+ --> $DIR/bad-template.rs:38:19
142+ |
143+ LL | global_asm!("{}", a = const FOO);
144+ | ^^^^^^^^^^^^^
145+
146+ error: named argument never used
147+ --> $DIR/bad-template.rs:38:19
148+ |
149+ LL | global_asm!("{}", a = const FOO);
150+ | ^^^^^^^^^^^^^ named argument never used
151+ |
152+ = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
153+
154+ error: invalid reference to argument at index 1
155+ --> $DIR/bad-template.rs:41:14
156+ |
157+ LL | global_asm!("{1}", a = const FOO);
158+ | ^^^ from here
159+ |
160+ = note: no positional arguments were given
161+
162+ error: named argument never used
163+ --> $DIR/bad-template.rs:41:20
164+ |
165+ LL | global_asm!("{1}", a = const FOO);
166+ | ^^^^^^^^^^^^^ named argument never used
167+ |
168+ = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
169+
170+ error: asm template modifier must be a single character
171+ --> $DIR/bad-template.rs:44:16
172+ |
173+ LL | global_asm!("{:foo}", const FOO);
174+ | ^^^
175+
176+ error: multiple unused asm arguments
177+ --> $DIR/bad-template.rs:46:17
178+ |
179+ LL | global_asm!("", const FOO, const FOO);
180+ | ^^^^^^^^^ ^^^^^^^^^ argument never used
181+ | |
182+ | argument never used
183+ |
184+ = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
185+
186+ error: aborting due to 21 previous errors
102187
0 commit comments