Commit 8127a27eb1

Veikka Tuominen <git@vexu.eu>
2023-02-07 14:20:11
zig fmt: do not consider tuples blocks
Closes #14056
1 parent 31ed8d2
Changed files (3)
lib
std
src
lib/std/zig/render.zig
@@ -2807,14 +2807,6 @@ fn nodeIsBlock(tag: Ast.Node.Tag) bool {
         .block_semicolon,
         .block_two,
         .block_two_semicolon,
-        .struct_init_dot,
-        .struct_init_dot_comma,
-        .struct_init_dot_two,
-        .struct_init_dot_two_comma,
-        .array_init_dot,
-        .array_init_dot_comma,
-        .array_init_dot_two,
-        .array_init_dot_two_comma,
         => true,
         else => false,
     };
src/codegen/llvm.zig
@@ -2273,7 +2273,9 @@ pub const Object = struct {
 
                 const full_di_fields: [2]*llvm.DIType =
                     if (layout.tag_align >= layout.payload_align)
-                .{ tag_di, payload_di } else .{ payload_di, tag_di };
+                    .{ tag_di, payload_di }
+                else
+                    .{ payload_di, tag_di };
 
                 const full_di_ty = dib.createStructType(
                     compile_unit_scope,
src/AstGen.zig
@@ -1730,7 +1730,8 @@ fn structInitExprRlNone(
                 .container_type = ty_inst,
                 .name_start = str_index,
             }) } }
-        else .{ .rl = .none };
+        else
+            .{ .rl = .none };
         setExtra(astgen, extra_index, Zir.Inst.StructInitAnon.Item{
             .field_name = str_index,
             .init = try expr(gz, scope, sub_ri, field_init),