From c7ce03187d2e1c9600b3638e0c11cc74e653a395 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Thu, 28 Dec 2023 18:57:15 +0000 Subject: [PATCH] Add asm-goto to unstable book --- .../src/language-features/asm-goto.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/doc/unstable-book/src/language-features/asm-goto.md diff --git a/src/doc/unstable-book/src/language-features/asm-goto.md b/src/doc/unstable-book/src/language-features/asm-goto.md new file mode 100644 index 0000000000000..a9ad5e837448a --- /dev/null +++ b/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 ` 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.