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 46c06e5 commit dcc3ebbCopy full SHA for dcc3ebb
bindgen/codegen/mod.rs
@@ -2143,7 +2143,9 @@ impl CodeGenerator for CompInfo {
2143
} else if is_union && !forward_decl {
2144
// TODO(emilio): It'd be nice to unify this with the struct path
2145
// above somehow.
2146
- let layout = layout.expect("Unable to get layout information?");
+ let layout = layout.unwrap_or_else(|| {
2147
+ panic!("Unable to get layout information for item\n{:#?}", item)
2148
+ });
2149
if struct_layout.requires_explicit_align(layout) {
2150
explicit_align = Some(layout.align);
2151
}
0 commit comments