Skip to content

Commit efd157f

Browse files
jschweemilio
authored andcommitted
Remove warning for opaque forward declarations
Forward declarations never have a known layout, and the warning makes no sense in that case.
1 parent 115d94a commit efd157f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bindgen/codegen/mod.rs

+3-1
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)