From 8708d880c7d5d9ecf1121f4e1ca5b8ebebf05da1 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Sun, 9 Nov 2025 17:32:38 +0100 Subject: [PATCH] std.zig.AstGen: don't call convertToNonTupleLike in structDeclInner At the beginning of structDeclInner there is a special path that handles tuples, we don't have to do anything special here. --- lib/std/zig/AstGen.zig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/std/zig/AstGen.zig b/lib/std/zig/AstGen.zig index 8a8a88db6f93..60a927e37e19 100644 --- a/lib/std/zig/AstGen.zig +++ b/lib/std/zig/AstGen.zig @@ -5071,18 +5071,14 @@ fn structDeclInner( .decl => continue, .field => |field| field, }; + assert(!member.ast.tuple_like); astgen.src_hasher.update(tree.getNodeSource(member_node)); const field_name = try astgen.identAsString(member.ast.main_token); - member.convertToNonTupleLike(astgen.tree); - assert(!member.ast.tuple_like); wip_members.appendToField(@intFromEnum(field_name)); - const type_expr = member.ast.type_expr.unwrap() orelse { - return astgen.failTok(member.ast.main_token, "struct field missing type", .{}); - }; - + const type_expr = member.ast.type_expr.unwrap().?; const field_type = try typeExpr(&block_scope, &namespace.base, type_expr); const have_type_body = !block_scope.isEmpty(); const have_align = member.ast.align_expr != .none;