Add rust::Box member type aliases
diff --git a/gen/write.rs b/gen/write.rs
index e0396c9..e6fb4e9 100644
--- a/gen/write.rs
+++ b/gen/write.rs
@@ -79,6 +79,7 @@
fn write_includes(out: &mut OutFile, types: &Types) {
let mut has_int = false;
+ let mut has_box = false;
let mut has_unique_ptr = false;
let mut has_string = false;
@@ -90,6 +91,7 @@
Some(CxxString) => has_string = true,
Some(Bool) | Some(RustString) | None => {}
},
+ Type::RustBox(_) => has_box = true,
Type::UniquePtr(_) => has_unique_ptr = true,
_ => {}
}
@@ -104,6 +106,9 @@
if has_string {
writeln!(out, "#include <string>");
}
+ if has_box {
+ writeln!(out, "#include <type_traits>");
+ }
}
fn write_include_cxxbridge(out: &mut OutFile, types: &Types) {