@@ -214,162 +214,180 @@ LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
214214 |
215215 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
216216
217+ error: _ cannot be used for input operands
218+ --> $DIR/parse-error.rs:79:28
219+ |
220+ LL | asm!("{}", in(reg) _);
221+ | ^
222+
223+ error: _ cannot be used for input operands
224+ --> $DIR/parse-error.rs:81:31
225+ |
226+ LL | asm!("{}", inout(reg) _);
227+ | ^
228+
229+ error: _ cannot be used for input operands
230+ --> $DIR/parse-error.rs:83:35
231+ |
232+ LL | asm!("{}", inlateout(reg) _);
233+ | ^
234+
217235error: requires at least a template string argument
218- --> $DIR/parse-error.rs:84 :1
236+ --> $DIR/parse-error.rs:90 :1
219237 |
220238LL | global_asm!();
221239 | ^^^^^^^^^^^^^^
222240
223241error: asm template must be a string literal
224- --> $DIR/parse-error.rs:86 :13
242+ --> $DIR/parse-error.rs:92 :13
225243 |
226244LL | global_asm!(FOO);
227245 | ^^^
228246
229247error: expected token: `,`
230- --> $DIR/parse-error.rs:88 :18
248+ --> $DIR/parse-error.rs:94 :18
231249 |
232250LL | global_asm!("{}" FOO);
233251 | ^^^ expected `,`
234252
235253error: expected operand, options, or additional template string
236- --> $DIR/parse-error.rs:90 :19
254+ --> $DIR/parse-error.rs:96 :19
237255 |
238256LL | global_asm!("{}", FOO);
239257 | ^^^ expected operand, options, or additional template string
240258
241259error: expected expression, found end of macro arguments
242- --> $DIR/parse-error.rs:92 :24
260+ --> $DIR/parse-error.rs:98 :24
243261 |
244262LL | global_asm!("{}", const);
245263 | ^ expected expression
246264
247265error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
248- --> $DIR/parse-error.rs:94 :30
266+ --> $DIR/parse-error.rs:100 :30
249267 |
250268LL | global_asm!("{}", const(reg) FOO);
251269 | ^^^ expected one of `,`, `.`, `?`, or an operator
252270
253271error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
254- --> $DIR/parse-error.rs:96 :25
272+ --> $DIR/parse-error.rs:102 :25
255273 |
256274LL | global_asm!("", options(FOO));
257275 | ^^^ expected one of `)`, `att_syntax`, or `raw`
258276
259277error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
260- --> $DIR/parse-error.rs:98 :25
278+ --> $DIR/parse-error.rs:104 :25
261279 |
262280LL | global_asm!("", options(nomem FOO));
263281 | ^^^^^ expected one of `)`, `att_syntax`, or `raw`
264282
265283error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
266- --> $DIR/parse-error.rs:100 :25
284+ --> $DIR/parse-error.rs:106 :25
267285 |
268286LL | global_asm!("", options(nomem, FOO));
269287 | ^^^^^ expected one of `)`, `att_syntax`, or `raw`
270288
271289error: arguments are not allowed after options
272- --> $DIR/parse-error.rs:102 :30
290+ --> $DIR/parse-error.rs:108 :30
273291 |
274292LL | global_asm!("{}", options(), const FOO);
275293 | --------- ^^^^^^^^^ argument
276294 | |
277295 | previous options
278296
279297error: expected string literal
280- --> $DIR/parse-error.rs:104 :29
298+ --> $DIR/parse-error.rs:110 :29
281299 |
282300LL | global_asm!("", clobber_abi(FOO));
283301 | ^^^ not a string literal
284302
285303error: expected `)`, found `FOO`
286- --> $DIR/parse-error.rs:106 :33
304+ --> $DIR/parse-error.rs:112 :33
287305 |
288306LL | global_asm!("", clobber_abi("C" FOO));
289307 | ^^^ expected `)`
290308
291309error: expected `)`, found `,`
292- --> $DIR/parse-error.rs:108 :32
310+ --> $DIR/parse-error.rs:114 :32
293311 |
294312LL | global_asm!("", clobber_abi("C", FOO));
295313 | ^ expected `)`
296314
297315error: arguments are not allowed after clobber_abi
298- --> $DIR/parse-error.rs:110 :37
316+ --> $DIR/parse-error.rs:116 :37
299317 |
300318LL | global_asm!("{}", clobber_abi("C"), const FOO);
301319 | ---------------- ^^^^^^^^^ argument
302320 | |
303321 | clobber_abi
304322
305323error: `clobber_abi` cannot be used with `global_asm!`
306- --> $DIR/parse-error.rs:110 :19
324+ --> $DIR/parse-error.rs:116 :19
307325 |
308326LL | global_asm!("{}", clobber_abi("C"), const FOO);
309327 | ^^^^^^^^^^^^^^^^
310328
311329error: clobber_abi is not allowed after options
312- --> $DIR/parse-error.rs:113 :28
330+ --> $DIR/parse-error.rs:119 :28
313331 |
314332LL | global_asm!("", options(), clobber_abi("C"));
315333 | --------- ^^^^^^^^^^^^^^^^
316334 | |
317335 | options
318336
319337error: clobber_abi is not allowed after options
320- --> $DIR/parse-error.rs:115 :30
338+ --> $DIR/parse-error.rs:121 :30
321339 |
322340LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
323341 | --------- ^^^^^^^^^^^^^^^^
324342 | |
325343 | options
326344
327345error: clobber_abi specified multiple times
328- --> $DIR/parse-error.rs:117 :35
346+ --> $DIR/parse-error.rs:123 :35
329347 |
330348LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
331349 | ---------------- ^^^^^^^^^^^^^^^^
332350 | |
333351 | clobber_abi previously specified here
334352
335353error: duplicate argument named `a`
336- --> $DIR/parse-error.rs:119 :35
354+ --> $DIR/parse-error.rs:125 :35
337355 |
338356LL | global_asm!("{a}", a = const FOO, a = const BAR);
339357 | ------------- ^^^^^^^^^^^^^ duplicate argument
340358 | |
341359 | previously here
342360
343361error: argument never used
344- --> $DIR/parse-error.rs:119 :35
362+ --> $DIR/parse-error.rs:125 :35
345363 |
346364LL | global_asm!("{a}", a = const FOO, a = const BAR);
347365 | ^^^^^^^^^^^^^ argument never used
348366 |
349367 = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
350368
351369error: expected one of `clobber_abi`, `const`, or `options`, found `""`
352- --> $DIR/parse-error.rs:122 :28
370+ --> $DIR/parse-error.rs:128 :28
353371 |
354372LL | global_asm!("", options(), "");
355373 | ^^ expected one of `clobber_abi`, `const`, or `options`
356374
357375error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"`
358- --> $DIR/parse-error.rs:124 :30
376+ --> $DIR/parse-error.rs:130 :30
359377 |
360378LL | global_asm!("{}", const FOO, "{}", const FOO);
361379 | ^^^^ expected one of `clobber_abi`, `const`, or `options`
362380
363381error: asm template must be a string literal
364- --> $DIR/parse-error.rs:126 :13
382+ --> $DIR/parse-error.rs:132 :13
365383 |
366384LL | global_asm!(format!("{{{}}}", 0), const FOO);
367385 | ^^^^^^^^^^^^^^^^^^^^
368386 |
369387 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
370388
371389error: asm template must be a string literal
372- --> $DIR/parse-error.rs:128 :20
390+ --> $DIR/parse-error.rs:134 :20
373391 |
374392LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
375393 | ^^^^^^^^^^^^^^^^^^^^
@@ -439,6 +457,6 @@ LL | let mut bar = 0;
439457LL | asm!("{1}", in("x0") foo, const bar);
440458 | ^^^ non-constant value
441459
442- error: aborting due to 63 previous errors
460+ error: aborting due to 66 previous errors
443461
444462For more information about this error, try `rustc --explain E0435`.
0 commit comments