Explicitly delete opaque Rust type destructors
I guess MSVC finds this important enough to emit warnings about.
cxxbridge\sources\tests\ffi\lib.rs.cc(1220): warning C4624: 'tests::R': destructor was implicitly defined as deleted
diff --git a/gen/src/write.rs b/gen/src/write.rs
index 02f615d..c6331f4 100644
--- a/gen/src/write.rs
+++ b/gen/src/write.rs
@@ -359,9 +359,8 @@
writeln!(out, ";");
}
- if !methods.is_empty() {
- writeln!(out);
- }
+ writeln!(out, " ~{}() = delete;", ety.name.cxx);
+ writeln!(out);
out.builtin.layout = true;
out.include.cstddef = true;