rust/src/test/ui/asm
Dylan DPC 8650df5dea
Rollup merge of #73230 - Amanieu:asm-unused2, r=petrochenkov
Suggest including unused asm arguments in a comment to avoid error

We require all arguments to an `asm!` to be used in the template string, just like format strings. However in some cases (e.g. `black_box`) it may be desirable to have `asm!` arguments that are not used in the template string.

Currently this is a hard error rather than a lint since `#[allow]` does not work on macros (#63221), so this PR suggests using the unused arguments in an asm comment as a workaround.

r? @petrochenkov
2020-06-11 19:04:20 +02:00
..
bad-options.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
bad-options.stderr Add tests for asm! 2020-05-18 14:41:32 +01:00
bad-reg.rs Add support for high byte registers on x86 2020-05-18 14:41:32 +01:00
bad-reg.stderr Add borrow-check test 2020-05-18 14:41:34 +01:00
bad-template.rs Add a suggestion to use unused asm arguments in comments 2020-06-11 05:34:43 +01:00
bad-template.stderr Add a suggestion to use unused asm arguments in comments 2020-06-11 05:34:43 +01:00
const.rs Fix const handling and add tests for const operands 2020-05-18 14:41:35 +01:00
issue-72570.rs add test for #72960 2020-06-05 12:08:54 +02:00
issue-72570.stderr add test for #72960 2020-06-05 12:08:54 +02:00
noreturn.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
parse-error.rs Apply review feedback 2020-05-18 14:41:32 +01:00
parse-error.stderr Add a suggestion to use unused asm arguments in comments 2020-06-11 05:34:43 +01:00
rustfix-asm.fixed Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
rustfix-asm.rs Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
rustfix-asm.stderr Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
srcloc.rs Handle assembler warnings properly 2020-06-09 15:01:02 +01:00
srcloc.stderr Handle assembler warnings properly 2020-06-09 15:01:02 +01:00
sym.rs Properly handle InlineAsmOperand::SymFn when collecting monomorphized items 2020-05-24 02:04:49 +01:00
type-check-1.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
type-check-1.stderr Add tests for asm! 2020-05-18 14:41:32 +01:00
type-check-2.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
type-check-2.stderr Add tests for asm! 2020-05-18 14:41:32 +01:00
type-check-3.rs Add support for high byte registers on x86 2020-05-18 14:41:32 +01:00
type-check-3.stderr Add support for high byte registers on x86 2020-05-18 14:41:32 +01:00
type-check-4.rs Add borrow-check test 2020-05-18 14:41:34 +01:00
type-check-4.stderr Add borrow-check test 2020-05-18 14:41:34 +01:00