diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 09:02:57 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 19:17:21 -0700 |
| commit | aeaef8c0ffadab4145fd002f2edd87a6db66ebd1 (patch) | |
| tree | e4c76c76173e5e72bc1947e1886662c4c6b2ba3c /src/link/SpirV.zig | |
| parent | f0530385b57218ef323747bdb7438330a07d25cc (diff) | |
| download | zig-aeaef8c0ffadab4145fd002f2edd87a6db66ebd1.tar.gz zig-aeaef8c0ffadab4145fd002f2edd87a6db66ebd1.zip | |
update std lib and compiler sources to new for loop syntax
Diffstat (limited to 'src/link/SpirV.zig')
| -rw-r--r-- | src/link/SpirV.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig index 14a29e4498..2d74e404eb 100644 --- a/src/link/SpirV.zig +++ b/src/link/SpirV.zig @@ -298,7 +298,7 @@ fn cloneAir(air: Air, gpa: Allocator, air_arena: Allocator) !Air { const values = try gpa.alloc(Value, air.values.len); errdefer gpa.free(values); - for (values) |*value, i| { + for (values, 0..) |*value, i| { value.* = try air.values[i].copy(air_arena); } @@ -308,7 +308,7 @@ fn cloneAir(air: Air, gpa: Allocator, air_arena: Allocator) !Air { const air_tags = instructions.items(.tag); const air_datas = instructions.items(.data); - for (air_tags) |tag, i| { + for (air_tags, 0..) |tag, i| { switch (tag) { .alloc, .ret_ptr, .const_ty => air_datas[i].ty = try air_datas[i].ty.copy(air_arena), else => {}, |
