authorgravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-01-07 15:54:47+01:00
committergravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-01-07 16:27:50+01:00
log92458094c8f8294d7bb50d28b09dd2c02b03a25e
treefd046e58c422022b6b293b4b5da6c46698fb4829
parentc8fa767f083e610840cef688b709783c5ad66acc

Fix failing type reifications


2 files changed, 3 insertions(+), 3 deletions(-)

lib/std/meta.zig+1-1
......@@ -1015,7 +1015,7 @@ fn CreateUniqueTuple(comptime N: comptime_int, comptime types: [N]type) type {
10151015 @setEvalBranchQuota(10_000);
10161016 var num_buf: [128]u8 = undefined;
10171017 tuple_fields[i] = .{
1018 .name = std.fmt.bufPrint(&num_buf, "{d}", .{i}) catch unreachable,
1018 .name = std.fmt.bufPrintZ(&num_buf, "{d}", .{i}) catch unreachable,
10191019 .type = T,
10201020 .default_value = null,
10211021 .is_comptime = false,
test/behavior/type.zig+2-2
......@@ -549,7 +549,7 @@ test "Type.Fn" {
549549
550550test "reified struct field name from optional payload" {
551551 comptime {
552 const m_name: ?[1]u8 = "a".*;
552 const m_name: ?[1:0]u8 = "a".*;
553553 if (m_name) |*name| {
554554 const T = @Type(.{ .Struct = .{
555555 .layout = .Auto,
......@@ -711,7 +711,7 @@ test "struct field names sliced at comptime from larger string" {
711711 while (it.next()) |name| {
712712 fields = fields ++ &[_]Type.StructField{.{
713713 .alignment = 0,
714 .name = name,
714 .name = name ++ "",
715715 .type = usize,
716716 .default_value = null,
717717 .is_comptime = false,