add run-rustfix
test for machine-applicable suggestion
This commit is contained in:
parent
73fde17017
commit
8859da0bf2
3 changed files with 40 additions and 0 deletions
10
tests/ui/asm/unsupported-option.fixed
Normal file
10
tests/ui/asm/unsupported-option.fixed
Normal file
|
@ -0,0 +1,10 @@
|
|||
//@ run-rustfix
|
||||
|
||||
use std::arch::global_asm;
|
||||
|
||||
fn main() {}
|
||||
|
||||
global_asm!("", options(att_syntax, raw));
|
||||
//~^ ERROR the `nomem` option cannot be used with `global_asm!`
|
||||
//~| ERROR the `readonly` option cannot be used with `global_asm!`
|
||||
//~| ERROR the `noreturn` option cannot be used with `global_asm!`
|
10
tests/ui/asm/unsupported-option.rs
Normal file
10
tests/ui/asm/unsupported-option.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
//@ run-rustfix
|
||||
|
||||
use std::arch::global_asm;
|
||||
|
||||
fn main() {}
|
||||
|
||||
global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
|
||||
//~^ ERROR the `nomem` option cannot be used with `global_asm!`
|
||||
//~| ERROR the `readonly` option cannot be used with `global_asm!`
|
||||
//~| ERROR the `noreturn` option cannot be used with `global_asm!`
|
20
tests/ui/asm/unsupported-option.stderr
Normal file
20
tests/ui/asm/unsupported-option.stderr
Normal file
|
@ -0,0 +1,20 @@
|
|||
error: the `nomem` option cannot be used with `global_asm!`
|
||||
--> $DIR/unsupported-option.rs:7:37
|
||||
|
|
||||
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
|
||||
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
|
||||
|
||||
error: the `readonly` option cannot be used with `global_asm!`
|
||||
--> $DIR/unsupported-option.rs:7:44
|
||||
|
|
||||
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
|
||||
| ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly
|
||||
|
||||
error: the `noreturn` option cannot be used with `global_asm!`
|
||||
--> $DIR/unsupported-option.rs:7:54
|
||||
|
|
||||
LL | global_asm!("", options(att_syntax, nomem, readonly, noreturn, raw));
|
||||
| ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
Loading…
Add table
Reference in a new issue