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 643300c commit 88e6b8e
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
@@ -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 88e6b8e

Please sign in to comment.