aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-18 09:02:57 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-18 19:17:21 -0700
commitaeaef8c0ffadab4145fd002f2edd87a6db66ebd1 (patch)
treee4c76c76173e5e72bc1947e1886662c4c6b2ba3c /src/codegen.zig
parentf0530385b57218ef323747bdb7438330a07d25cc (diff)
downloadzig-aeaef8c0ffadab4145fd002f2edd87a6db66ebd1.tar.gz
zig-aeaef8c0ffadab4145fd002f2edd87a6db66ebd1.zip
update std lib and compiler sources to new for loop syntax
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index c0a04765b0..9eea1c667d 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -511,7 +511,7 @@ pub fn generateSymbol(
try code.resize(current_pos + abi_size);
var bits: u16 = 0;
- for (field_vals) |field_val, index| {
+ for (field_vals, 0..) |field_val, index| {
const field_ty = fields[index].ty;
// pointer may point to a decl which must be marked used
// but can also result in a relocation. Therefore we handle those seperately.
@@ -537,7 +537,7 @@ pub fn generateSymbol(
const struct_begin = code.items.len;
const field_vals = typed_value.val.castTag(.aggregate).?.data;
- for (field_vals) |field_val, index| {
+ for (field_vals, 0..) |field_val, index| {
const field_ty = typed_value.ty.structFieldType(index);
if (!field_ty.hasRuntimeBits()) continue;