Emit bitcopy forward declaration needed by String constructor
diff --git a/gen/write.rs b/gen/write.rs
index 72962f2..a17f8f7 100644
--- a/gen/write.rs
+++ b/gen/write.rs
@@ -183,6 +183,11 @@
writeln!(out, "// #include \"rust/cxx.h\"");
}
+ if needs_rust_string {
+ out.next_section();
+ writeln!(out, "struct unsafe_bitcopy_t;");
+ }
+
write_header_section(out, needs_rust_string, "CXXBRIDGE02_RUST_STRING");
write_header_section(out, needs_rust_str, "CXXBRIDGE02_RUST_STR");
write_header_section(out, needs_rust_box, "CXXBRIDGE02_RUST_BOX");