-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
run-rustfix
test for machine-applicable suggestion
- Loading branch information
1 parent
73fde17
commit 8859da0
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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!` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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!` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|