-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make asm_goto_with_outputs a separate feature gate
- Loading branch information
Showing
8 changed files
with
68 additions
and
11 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
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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
tests/ui/feature-gates/feature-gate-asm_goto_with_outputs.rs
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,13 @@ | ||
//@ only-x86_64 | ||
|
||
#![feature(asm_goto)] | ||
|
||
use std::arch::asm; | ||
|
||
fn main() { | ||
let mut _out: u64; | ||
unsafe { | ||
asm!("mov {}, 1", "jmp {}", out(reg) _out, label {}); | ||
//~^ ERROR using both label and outputs operands for inline assembly is unstable | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/ui/feature-gates/feature-gate-asm_goto_with_outputs.stderr
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,13 @@ | ||
error[E0658]: using both label and outputs operands for inline assembly is unstable | ||
--> $DIR/feature-gate-asm_goto_with_outputs.rs:10:52 | ||
| | ||
LL | asm!("mov {}, 1", "jmp {}", out(reg) _out, label {}); | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #119364 <https://github.com/rust-lang/rust/issues/119364> for more information | ||
= help: add `#![feature(asm_goto_with_outputs)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |