- //TODO: do we still need this conditions and the set_fields parameter?
- //if set_fields {
- let (fields, packed) = struct_fields(cx, layout);
- cx.set_struct_body(ty, &fields, packed);
- /*}
- else {
- // Since we might be trying to generate a type containing another type which is not
- // completely generated yet, we don't set the fields right now, but we save the
- // type to set the fields later.
- cx.types_with_fields_to_set.borrow_mut().insert(ty.as_type(), (ty, layout));
- }*/
+ let (fields, packed) = struct_fields(cx, layout);
+ cx.set_struct_body(ty, &fields, packed);