diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2025-05-12 18:53:57 +0200 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2025-05-14 06:47:23 +0200 |
| commit | bc2f7c7547dce95dfd1aa00e377ae9f366825177 (patch) | |
| tree | 0a6c954644e403a79895ea9d27497e92e99cb9b1 /lib/std/meta.zig | |
| parent | 518105471e145c90809fb2f5baa53cd08bde31aa (diff) | |
| download | zig-bc2f7c7547dce95dfd1aa00e377ae9f366825177.tar.gz zig-bc2f7c7547dce95dfd1aa00e377ae9f366825177.zip | |
Revert "Work around stage1 not yet returning null-terminated `@typeInfo` strings"
This reverts commit c8fa767f083e610840cef688b709783c5ad66acc.
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 5707527aed..5a4ec517b0 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -537,7 +537,7 @@ pub fn FieldEnum(comptime T: type) type { var decls = [_]std.builtin.Type.Declaration{}; inline for (field_infos, 0..) |field, i| { enumFields[i] = .{ - .name = field.name ++ "", + .name = field.name, .value = i, }; } @@ -609,7 +609,7 @@ pub fn DeclEnum(comptime T: type) type { var enumDecls: [fieldInfos.len]std.builtin.Type.EnumField = undefined; var decls = [_]std.builtin.Type.Declaration{}; inline for (fieldInfos, 0..) |field, i| { - enumDecls[i] = .{ .name = field.name ++ "", .value = i }; + enumDecls[i] = .{ .name = field.name, .value = i }; } return @Type(.{ .@"enum" = .{ |
