Skip to content

Commit

Permalink
Add asm-goto to unstable book
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Dec 28, 2023
1 parent 5bb0191 commit c7ce031
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/doc/unstable-book/src/language-features/asm-goto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# `asm_goto`

The tracking issue for this feature is: [#119364]

[#119364]: https://github.com/rust-lang/rust/issues/119364

------------------------

This feature adds a `label <block>` operand type to `asm!`.

Example:
```rust,ignore (partial-example, x86-only)
unsafe {
asm!(
"jmp {}",
label {
println!("Jumped from asm!");
}
);
}
```

The block must have unit type.

0 comments on commit c7ce031

Please sign in to comment.