Skip to content

Commit

Permalink
Log item for which layout retrieval fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mohe2015 committed Jul 25, 2024
1 parent 46c06e5 commit 9029e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@ 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

0 comments on commit 9029e60

Please sign in to comment.