update std lib and compiler sources to new for loop syntax

This commit is contained in:
Andrew Kelley
2023-02-18 09:02:57 -07:00
parent f0530385b5
commit aeaef8c0ff
216 changed files with 938 additions and 938 deletions

View File

@@ -899,7 +899,7 @@ pub fn main() anyerror!void {
}
} else {
var threads = try arena.alloc(std.Thread, llvm_targets.len);
for (llvm_targets) |llvm_target, i| {
for (llvm_targets, 0..) |llvm_target, i| {
const job = Job{
.llvm_tblgen_exe = llvm_tblgen_exe,
.llvm_src_root = llvm_src_root,
@@ -1226,7 +1226,7 @@ fn processOneTarget(job: Job) anyerror!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;
\\ }