summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gen.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gen.rs b/src/gen.rs
index 13c62dbe..de9988b8 100644
--- a/src/gen.rs
+++ b/src/gen.rs
@@ -1048,6 +1048,9 @@ fn cstruct_to_rs(ctx: &mut GenCtx, name: &str, ci: CompInfo) -> Vec<P<ast::Item>
let is_translatable = cty_is_translatable(&f_ty);
if !is_translatable || type_opaque(ctx, &f_ty) {
+ // Be conservative here and assume it might have a
+ // destructor or some other serious constraint.
+ has_destructor = true;
if !is_translatable {
println!("{}::{} not translatable, void: {}", ci.name, f.name, f_ty == TVoid);
}