Provide rust::Fn call operator in generated header
Even though the generated code does not use them, this avoids a
situation where the user's code includes a generated header (but not
rust/cxx.h) and thus gets the class definition of rust::Fn, but with the
function call operators undefined. Previously they'd have gotten missing
template errors unless they also included rust/cxx.h.
diff --git a/gen/src/builtin.rs b/gen/src/builtin.rs
index f3240d0..8a25769 100644
--- a/gen/src/builtin.rs
+++ b/gen/src/builtin.rs
@@ -72,6 +72,10 @@
builtin.unsafe_bitcopy = true;
}
+ if builtin.rust_fn {
+ include.utility = true;
+ }
+
if builtin.rust_error {
include.exception = true;
builtin.friend_impl = true;