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 4c07a72 commit 0e76c8cCopy full SHA for 0e76c8c
src/codegen/mod.rs
@@ -1136,9 +1136,11 @@ impl CodeGenerator for CompInfo {
1136
}
1137
};
1138
1139
- if let Some(padding_field) =
1140
- struct_layout.pad_field(&field_name, field_ty, field.offset()) {
1141
- fields.push(padding_field);
+ if !is_union {
+ if let Some(padding_field) =
+ struct_layout.pad_field(&field_name, field_ty, field.offset()) {
1142
+ fields.push(padding_field);
1143
+ }
1144
1145
1146
let is_private = field.annotations()
0 commit comments