| ... | @@ -4,7 +4,8 @@ const extras = @import("./lib.zig"); | ... | @@ -4,7 +4,8 @@ const extras = @import("./lib.zig"); |
| 4 | const expectSimilarType = extras.expectSimilarType; | 4 | const expectSimilarType = extras.expectSimilarType; |
| 5 | | 5 | |
| 6 | pub fn StructOfSlices(T: type) type { | 6 | pub fn StructOfSlices(T: type) type { |
| 7 | const fields = std.meta.fields(T); | 7 | const info = @typeInfo(T).@"struct"; |
| | 8 | const fields = info.fields; |
| 8 | var new_fields: [fields.len]std.builtin.Type.StructField = undefined; | 9 | var new_fields: [fields.len]std.builtin.Type.StructField = undefined; |
| 9 | for (fields, 0..) |item, i| { | 10 | for (fields, 0..) |item, i| { |
| 10 | new_fields[i] = .{ | 11 | new_fields[i] = .{ |
| ... | @@ -21,7 +22,7 @@ pub fn StructOfSlices(T: type) type { | ... | @@ -21,7 +22,7 @@ pub fn StructOfSlices(T: type) type { |
| 21 | .backing_integer = null, | 22 | .backing_integer = null, |
| 22 | .fields = result, | 23 | .fields = result, |
| 23 | .decls = &.{}, | 24 | .decls = &.{}, |
| 24 | .is_tuple = false, | 25 | .is_tuple = info.is_tuple, |
| 25 | })); | 26 | })); |
| 26 | } | 27 | } |
| 27 | | 28 | |