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.
2 parents d57616c + 0e76c8c commit b71c7baCopy full SHA for b71c7ba
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