Skip to content

Commit 9029e60

Browse files
committed
Log item for which layout retrieval fails
1 parent 46c06e5 commit 9029e60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bindgen/codegen/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ impl CodeGenerator for CompInfo {
21432143
} else if is_union && !forward_decl {
21442144
// TODO(emilio): It'd be nice to unify this with the struct path
21452145
// above somehow.
2146-
let layout = layout.expect("Unable to get layout information?");
2146+
let layout = layout.unwrap_or_else(|| panic!("Unable to get layout information for item\n{:#?}", item));
21472147
if struct_layout.requires_explicit_align(layout) {
21482148
explicit_align = Some(layout.align);
21492149
}

0 commit comments

Comments
 (0)