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/glibc.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/glibc.zig')
| -rw-r--r-- | src/glibc.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index 2a2887c334..3021e7c7ba 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -698,7 +698,7 @@ pub fn buildSharedObjects(comp: *Compilation) !void { const metadata = try loadMetaData(comp.gpa, abilists_contents); defer metadata.destroy(comp.gpa); - const target_targ_index = for (metadata.all_targets) |targ, i| { + const target_targ_index = for (metadata.all_targets, 0..) |targ, i| { if (targ.arch == target.cpu.arch and targ.os == target.os.tag and targ.abi == target.abi) @@ -709,7 +709,7 @@ pub fn buildSharedObjects(comp: *Compilation) !void { unreachable; // target_util.available_libcs prevents us from getting here }; - const target_ver_index = for (metadata.all_versions) |ver, i| { + const target_ver_index = for (metadata.all_versions, 0..) |ver, i| { switch (ver.order(target_version)) { .eq => break i, .lt => continue, @@ -743,7 +743,7 @@ pub fn buildSharedObjects(comp: *Compilation) !void { var stubs_asm = std.ArrayList(u8).init(comp.gpa); defer stubs_asm.deinit(); - for (libs) |lib, lib_i| { + for (libs, 0..) |lib, lib_i| { stubs_asm.shrinkRetainingCapacity(0); try stubs_asm.appendSlice(".text\n"); |
