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 9029e60Copy full SHA for 9029e60
bindgen/codegen/mod.rs
@@ -2143,7 +2143,7 @@ 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(|| panic!("Unable to get layout information for item\n{:#?}", item));
2147
if struct_layout.requires_explicit_align(layout) {
2148
explicit_align = Some(layout.align);
2149
}
0 commit comments