We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fffbf8 commit 5ac0381Copy full SHA for 5ac0381
bindgen/codegen/struct_layout.rs
@@ -212,7 +212,10 @@ impl<'a> StructLayoutTracker<'a> {
212
0
213
} else if !self.is_packed {
214
self.padding_bytes(field_layout)
215
- } else if let Some(l) = self.known_type_layout {
+ } else if let Some(mut l) = self.known_type_layout {
216
+ if field_layout.align < l.align {
217
+ l.align = field_layout.align;
218
+ }
219
self.padding_bytes(l)
220
} else {
221
0 commit comments