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 /tools/update_spirv_features.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 'tools/update_spirv_features.zig')
| -rw-r--r-- | tools/update_spirv_features.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/update_spirv_features.zig b/tools/update_spirv_features.zig index a7eb3c18f9..bb859ed5b4 100644 --- a/tools/update_spirv_features.zig +++ b/tools/update_spirv_features.zig @@ -130,7 +130,7 @@ pub fn main() !void { \\ ); - for (versions) |ver, i| { + for (versions, 0..) |ver, i| { try w.print( \\ result[@enumToInt(Feature.v{0}_{1})] = .{{ \\ .llvm_name = null, @@ -203,7 +203,7 @@ pub fn main() !void { try w.writeAll( \\ const ti = @typeInfo(Feature); - \\ for (result) |*elem, i| { + \\ for (&result, 0..) |*elem, i| { \\ elem.index = i; \\ elem.name = ti.Enum.fields[i].name; \\ } |
