authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-02-07 15:20:11+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-02-11 14:36:54+02:00
log8127a27eb11cec26203a8fa15afdee046d3ff507
tree317a7e49736eb6a2ee38be7ae0fe5ae00463215c
parent31ed8d293ddb79d34306e0b23e76d8a361c8856f

zig fmt: do not consider tuples blocks

Closes #14056

3 files changed, 5 insertions(+), 10 deletions(-)

lib/std/zig/render.zig-8
...@@ -2807,14 +2807,6 @@ fn nodeIsBlock(tag: Ast.Node.Tag) bool {...@@ -2807,14 +2807,6 @@ fn nodeIsBlock(tag: Ast.Node.Tag) bool {
2807 .block_semicolon,2807 .block_semicolon,
2808 .block_two,2808 .block_two,
2809 .block_two_semicolon,2809 .block_two_semicolon,
2810 .struct_init_dot,
2811 .struct_init_dot_comma,
2812 .struct_init_dot_two,
2813 .struct_init_dot_two_comma,
2814 .array_init_dot,
2815 .array_init_dot_comma,
2816 .array_init_dot_two,
2817 .array_init_dot_two_comma,
2818 => true,2810 => true,
2819 else => false,2811 else => false,
2820 };2812 };
src/AstGen.zig+2-1
...@@ -1730,7 +1730,8 @@ fn structInitExprRlNone(...@@ -1730,7 +1730,8 @@ fn structInitExprRlNone(
1730 .container_type = ty_inst,1730 .container_type = ty_inst,
1731 .name_start = str_index,1731 .name_start = str_index,
1732 }) } }1732 }) } }
1733 else .{ .rl = .none };1733 else
1734 .{ .rl = .none };
1734 setExtra(astgen, extra_index, Zir.Inst.StructInitAnon.Item{1735 setExtra(astgen, extra_index, Zir.Inst.StructInitAnon.Item{
1735 .field_name = str_index,1736 .field_name = str_index,
1736 .init = try expr(gz, scope, sub_ri, field_init),1737 .init = try expr(gz, scope, sub_ri, field_init),
src/codegen/llvm.zig+3-1
...@@ -2273,7 +2273,9 @@ pub const Object = struct {...@@ -2273,7 +2273,9 @@ pub const Object = struct {
22732273
2274 const full_di_fields: [2]*llvm.DIType =2274 const full_di_fields: [2]*llvm.DIType =
2275 if (layout.tag_align >= layout.payload_align)2275 if (layout.tag_align >= layout.payload_align)
2276 .{ tag_di, payload_di } else .{ payload_di, tag_di };2276 .{ tag_di, payload_di }
2277 else
2278 .{ payload_di, tag_di };
22772279
2278 const full_di_ty = dib.createStructType(2280 const full_di_ty = dib.createStructType(
2279 compile_unit_scope,2281 compile_unit_scope,