3 The tracking issue for this feature is [#29625]
5 See Also: [`unboxed_closures`](language-features/unboxed-closures.html)
7 [#29625]: https://github.com/rust-lang/rust/issues/29625
11 The `fn_traits` feature allows for implementation of the [`Fn*`] traits
12 for creating custom closure-like types.
14 [`Fn*`]: https://doc.rust-lang.org/std/ops/trait.Fn.html
17 #![feature(unboxed_closures)]
18 #![feature(fn_traits)]
24 impl FnOnce<(u32, )> for Adder {
26 extern "rust-call" fn call_once(self, b: (u32, )) -> Self::Output {
32 let adder = Adder { a: 3 };
33 assert_eq!(adder(2), 5);