We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7735f59 commit 364148dCopy full SHA for 364148d
src/doc/unstable-book/src/language-features/unboxed-closures.md
@@ -0,0 +1,25 @@
1
+# `unboxed_closures`
2
+
3
+The tracking issue for this feature is [#29625]
4
5
+See Also: [`fn_traits`](library-features/fn-traits.md)
6
7
+[#29625]: https://github.com/rust-lang/rust/issues/29625
8
9
+----
10
11
+The `unboxed_closures` feature allows you to write functions using the `"rust-call"` ABI,
12
+required for implmenting the [`Fn*`] family of traits. `"rust-call"` functions must have
13
+exactly one (non self) argument, a tuple representing the argument list.
14
15
+[`Fn*`]: https://doc.rust-lang.org/std/ops/trait.Fn.html
16
17
+```rust
18
+#![feature(unboxed_closures)]
19
20
+extern "rust-call" fn add_args(args: (u32, u32)) {
21
+ args.0 + args.1
22
+}
23
24
+fn main() {}
25
+```
0 commit comments