We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66b6551 commit c0b2470Copy full SHA for c0b2470
bindgen/codegen/mod.rs
@@ -2216,7 +2216,9 @@ impl CodeGenerator for CompInfo {
2216
} else if is_union && !forward_decl {
2217
// TODO(emilio): It'd be nice to unify this with the struct path
2218
// above somehow.
2219
- let layout = layout.expect("Unable to get layout information?");
+ let layout = layout.unwrap_or_else(|| {
2220
+ panic!("Unable to get layout information for item\n{:#?}", item)
2221
+ });
2222
if struct_layout.requires_explicit_align(layout) {
2223
explicit_align = Some(layout.align);
2224
}
0 commit comments