Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,9 @@ impl CodeGenerator for CompInfo {
} else if is_union && !forward_decl {
// TODO(emilio): It'd be nice to unify this with the struct path
// above somehow.
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)
});
if struct_layout.requires_explicit_align(layout) {
explicit_align = Some(layout.align);
}
Expand Down