aboutsummaryrefslogtreecommitdiff
path: root/lib/std/meta.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/meta.zig')
-rw-r--r--lib/std/meta.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig
index da0f629748..3ad2c2de13 100644
--- a/lib/std/meta.zig
+++ b/lib/std/meta.zig
@@ -465,7 +465,8 @@ pub fn fieldNames(comptime T: type) *const [fields(T).len][:0]const u8 {
var names: [fieldInfos.len][:0]const u8 = undefined;
// This concat can be removed with the next zig1 update.
for (&names, fieldInfos) |*name, field| name.* = field.name ++ "";
- break :blk &names;
+ const final = names;
+ break :blk &final;
};
}
@@ -506,7 +507,8 @@ pub fn tags(comptime T: type) *const [fields(T).len]T {
for (fieldInfos, 0..) |field, i| {
res[i] = @field(T, field.name);
}
- break :blk &res;
+ const final = res;
+ break :blk &final;
};
}