Skip to content

Commit 4a85daa

Browse files
committed
Remove warning for opaque forward declarations
Forward declarations never have a known layout, and the warning makes no sense in that case.
1 parent 03d49b6 commit 4a85daa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bindgen/codegen/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,9 @@ impl CodeGenerator for CompInfo {
23152315
});
23162316
}
23172317
None => {
2318-
warn!("Opaque type without layout! Expect dragons!");
2318+
if !forward_decl {
2319+
warn!("Opaque type without layout! Expect dragons!");
2320+
}
23192321
}
23202322
}
23212323
} else if !is_union && !zero_sized {

0 commit comments

Comments
 (0)