about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2023-12-28 18:57:15 +0000
committerGary Guo <gary@garyguo.net>2024-02-24 19:49:16 +0000
commit84bc9e9e369ba23a244d9a6b8c047e6f1e0d6e7a (patch)
tree0f6a8f9778c9782eff62b22f398e1dcf624df189
parent4677a71369f690b5aecf9380cf12074792f09a3f (diff)
downloadrust-84bc9e9e369ba23a244d9a6b8c047e6f1e0d6e7a.tar.gz
rust-84bc9e9e369ba23a244d9a6b8c047e6f1e0d6e7a.zip
Add asm-goto to unstable book
-rw-r--r--src/doc/unstable-book/src/language-features/asm-goto.md24
1 files changed, 24 insertions, 0 deletions
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 00000000000..a9ad5e83744
--- /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 <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.