authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-02 18:35:32-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-02 18:35:32-04:00
log832caefc2a1b20deb513d43306d6723670ba9c8f
tree30401a79076971ead109ea05748e97049adcb71b
parent4cd50865bffab670040f20b69da13d2f3e89f86f

fix regressions


16 files changed, 56 insertions(+), 55 deletions(-)

doc/docgen.zig+2-2
......@@ -40,11 +40,11 @@ pub fn main() !void {
4040 var out_file = try os.File.openWrite(out_file_name);
4141 defer out_file.close();
4242
43 var file_in_stream = io.FileInStream.init(&in_file);
43 var file_in_stream = io.FileInStream.init(in_file);
4444
4545 const input_file_bytes = try file_in_stream.stream.readAllAlloc(allocator, max_doc_file_size);
4646
47 var file_out_stream = io.FileOutStream.init(&out_file);
47 var file_out_stream = io.FileOutStream.init(out_file);
4848 var buffered_out_stream = io.BufferedOutStream(io.FileOutStream.Error).init(&file_out_stream.stream);
4949
5050 var tokenizer = Tokenizer.init(in_file_name, input_file_bytes);
example/guess_number/main.zig+1-1
......@@ -6,7 +6,7 @@ const os = std.os;
66
77pub fn main() !void {
88 var stdout_file = try io.getStdOut();
9 var stdout_file_stream = io.FileOutStream.init(&stdout_file);
9 var stdout_file_stream = io.FileOutStream.init(stdout_file);
1010 const stdout = &stdout_file_stream.stream;
1111
1212 try stdout.print("Welcome to the Guess Number Game in Zig.\n");
src-self-hosted/errmsg.zig+1-1
......@@ -272,7 +272,7 @@ pub const Msg = struct {
272272 try stream.write("\n");
273273 }
274274
275 pub fn printToFile(msg: *const Msg, file: *os.File, color: Color) !void {
275 pub fn printToFile(msg: *const Msg, file: os.File, color: Color) !void {
276276 const color_on = switch (color) {
277277 Color.Auto => file.isTty(),
278278 Color.On => true,
src-self-hosted/main.zig+6-6
......@@ -55,11 +55,11 @@ pub fn main() !void {
5555 const allocator = std.heap.c_allocator;
5656
5757 var stdout_file = try std.io.getStdOut();
58 var stdout_out_stream = std.io.FileOutStream.init(&stdout_file);
58 var stdout_out_stream = std.io.FileOutStream.init(stdout_file);
5959 stdout = &stdout_out_stream.stream;
6060
6161 stderr_file = try std.io.getStdErr();
62 var stderr_out_stream = std.io.FileOutStream.init(&stderr_file);
62 var stderr_out_stream = std.io.FileOutStream.init(stderr_file);
6363 stderr = &stderr_out_stream.stream;
6464
6565 const args = try os.argsAlloc(allocator);
......@@ -491,7 +491,7 @@ async fn processBuildEvents(comp: *Compilation, color: errmsg.Color) void {
491491 stderr.print("Build {} compile errors:\n", count) catch os.exit(1);
492492 for (msgs) |msg| {
493493 defer msg.destroy();
494 msg.printToFile(&stderr_file, color) catch os.exit(1);
494 msg.printToFile(stderr_file, color) catch os.exit(1);
495495 }
496496 },
497497 }
......@@ -619,7 +619,7 @@ fn cmdFmt(allocator: *Allocator, args: []const []const u8) !void {
619619 }
620620
621621 var stdin_file = try io.getStdIn();
622 var stdin = io.FileInStream.init(&stdin_file);
622 var stdin = io.FileInStream.init(stdin_file);
623623
624624 const source_code = try stdin.stream.readAllAlloc(allocator, max_src_size);
625625 defer allocator.free(source_code);
......@@ -635,7 +635,7 @@ fn cmdFmt(allocator: *Allocator, args: []const []const u8) !void {
635635 const msg = try errmsg.Msg.createFromParseError(allocator, parse_error, &tree, "<stdin>");
636636 defer msg.destroy();
637637
638 try msg.printToFile(&stderr_file, color);
638 try msg.printToFile(stderr_file, color);
639639 }
640640 if (tree.errors.len != 0) {
641641 os.exit(1);
......@@ -772,7 +772,7 @@ async fn fmtPath(fmt: *Fmt, file_path_ref: []const u8) FmtError!void {
772772 const msg = try errmsg.Msg.createFromParseError(fmt.loop.allocator, parse_error, &tree, file_path);
773773 defer fmt.loop.allocator.destroy(msg);
774774
775 try msg.printToFile(&stderr_file, fmt.color);
775 try msg.printToFile(stderr_file, fmt.color);
776776 }
777777 if (tree.errors.len != 0) {
778778 fmt.any_error = true;
src-self-hosted/test.zig+2-2
......@@ -185,7 +185,7 @@ pub const TestContext = struct {
185185 try stderr.write("build incorrectly failed:\n");
186186 for (msgs) |msg| {
187187 defer msg.destroy();
188 try msg.printToFile(&stderr, errmsg.Color.Auto);
188 try msg.printToFile(stderr, errmsg.Color.Auto);
189189 }
190190 },
191191 }
......@@ -234,7 +234,7 @@ pub const TestContext = struct {
234234 var stderr = try std.io.getStdErr();
235235 for (msgs) |msg| {
236236 defer msg.destroy();
237 try msg.printToFile(&stderr, errmsg.Color.Auto);
237 try msg.printToFile(stderr, errmsg.Color.Auto);
238238 }
239239 std.debug.warn("============\n");
240240 return error.TestFailed;
std/debug/index.zig+7-7
......@@ -862,7 +862,7 @@ fn openSelfDebugInfoLinux(allocator: *mem.Allocator) !DebugInfo {
862862 di.self_exe_file = try os.openSelfExe();
863863 errdefer di.self_exe_file.close();
864864
865 try di.elf.openFile(allocator, &di.self_exe_file);
865 try di.elf.openFile(allocator, di.self_exe_file);
866866 errdefer di.elf.close();
867867
868868 di.debug_info = (try di.elf.findSection(".debug_info")) orelse return error.MissingDebugInfo;
......@@ -1067,7 +1067,7 @@ pub const DebugInfo = switch (builtin.os) {
10671067 }
10681068
10691069 pub fn readString(self: *DebugInfo) ![]u8 {
1070 var in_file_stream = io.FileInStream.init(&self.self_exe_file);
1070 var in_file_stream = io.FileInStream.init(self.self_exe_file);
10711071 const in_stream = &in_file_stream.stream;
10721072 return readStringRaw(self.allocator(), in_stream);
10731073 }
......@@ -1403,7 +1403,7 @@ fn parseFormValue(allocator: *mem.Allocator, in_stream: var, form_id: u64, is_64
14031403}
14041404
14051405fn parseAbbrevTable(st: *DebugInfo) !AbbrevTable {
1406 const in_file = &st.self_exe_file;
1406 const in_file = st.self_exe_file;
14071407 var in_file_stream = io.FileInStream.init(in_file);
14081408 const in_stream = &in_file_stream.stream;
14091409 var result = AbbrevTable.init(st.allocator());
......@@ -1454,7 +1454,7 @@ fn getAbbrevTableEntry(abbrev_table: *const AbbrevTable, abbrev_code: u64) ?*con
14541454}
14551455
14561456fn parseDie(st: *DebugInfo, abbrev_table: *const AbbrevTable, is_64: bool) !Die {
1457 const in_file = &st.self_exe_file;
1457 const in_file = st.self_exe_file;
14581458 var in_file_stream = io.FileInStream.init(in_file);
14591459 const in_stream = &in_file_stream.stream;
14601460 const abbrev_code = try readULeb128(in_stream);
......@@ -1676,7 +1676,7 @@ fn getLineNumberInfoMacOs(di: *DebugInfo, symbol: MachoSymbol, target_address: u
16761676fn getLineNumberInfoLinux(di: *DebugInfo, compile_unit: *const CompileUnit, target_address: usize) !LineInfo {
16771677 const compile_unit_cwd = try compile_unit.die.getAttrString(di, DW.AT_comp_dir);
16781678
1679 const in_file = &di.self_exe_file;
1679 const in_file = di.self_exe_file;
16801680 const debug_line_end = di.debug_line.offset + di.debug_line.size;
16811681 var this_offset = di.debug_line.offset;
16821682 var this_index: usize = 0;
......@@ -1856,7 +1856,7 @@ fn scanAllCompileUnits(st: *DebugInfo) !void {
18561856 var this_unit_offset = st.debug_info.offset;
18571857 var cu_index: usize = 0;
18581858
1859 var in_file_stream = io.FileInStream.init(&st.self_exe_file);
1859 var in_file_stream = io.FileInStream.init(st.self_exe_file);
18601860 const in_stream = &in_file_stream.stream;
18611861
18621862 while (this_unit_offset < debug_info_end) {
......@@ -1922,7 +1922,7 @@ fn scanAllCompileUnits(st: *DebugInfo) !void {
19221922}
19231923
19241924fn findCompileUnit(st: *DebugInfo, target_address: u64) !*const CompileUnit {
1925 var in_file_stream = io.FileInStream.init(&st.self_exe_file);
1925 var in_file_stream = io.FileInStream.init(st.self_exe_file);
19261926 const in_stream = &in_file_stream.stream;
19271927 for (st.compile_unit_list.toSlice()) |*compile_unit| {
19281928 if (compile_unit.pc_range) |range| {
std/elf.zig+2-2
......@@ -353,7 +353,7 @@ pub const SectionHeader = struct {
353353};
354354
355355pub const Elf = struct {
356 in_file: *os.File,
356 in_file: os.File,
357357 auto_close_stream: bool,
358358 is_64: bool,
359359 endian: builtin.Endian,
......@@ -376,7 +376,7 @@ pub const Elf = struct {
376376 }
377377
378378 /// Call close when done.
379 pub fn openFile(elf: *Elf, allocator: *mem.Allocator, file: *os.File) !void {
379 pub fn openFile(elf: *Elf, allocator: *mem.Allocator, file: os.File) !void {
380380 elf.allocator = allocator;
381381 elf.in_file = file;
382382 elf.auto_close_stream = false;
std/event/tcp.zig+3-3
......@@ -145,11 +145,11 @@ test "listen on a port, send bytes, receive bytes" {
145145 cancel @handle();
146146 }
147147 }
148 async fn errorableHandler(self: *Self, _addr: *const std.net.Address, _socket: *const std.os.File) !void {
148 async fn errorableHandler(self: *Self, _addr: *const std.net.Address, _socket: std.os.File) !void {
149149 const addr = _addr.*; // TODO https://github.com/ziglang/zig/issues/733
150 var socket = _socket.*; // TODO https://github.com/ziglang/zig/issues/733
150 var socket = _socket; // TODO https://github.com/ziglang/zig/issues/733
151151
152 var adapter = std.io.FileOutStream.init(&socket);
152 var adapter = std.io.FileOutStream.init(socket);
153153 var stream = &adapter.stream;
154154 try stream.print("hello from server\n");
155155 }
std/io.zig+3-3
......@@ -280,7 +280,7 @@ pub fn readFileAllocAligned(allocator: *mem.Allocator, path: []const u8, comptim
280280 const buf = try allocator.alignedAlloc(u8, A, size);
281281 errdefer allocator.free(buf);
282282
283 var adapter = FileInStream.init(&file);
283 var adapter = FileInStream.init(file);
284284 try adapter.stream.readNoEof(buf[0..size]);
285285 return buf;
286286}
......@@ -592,7 +592,7 @@ pub const BufferedAtomicFile = struct {
592592 self.atomic_file = try os.AtomicFile.init(allocator, dest_path, os.File.default_mode);
593593 errdefer self.atomic_file.deinit();
594594
595 self.file_stream = FileOutStream.init(&self.atomic_file.file);
595 self.file_stream = FileOutStream.init(self.atomic_file.file);
596596 self.buffered_stream = BufferedOutStream(FileOutStream.Error).init(&self.file_stream.stream);
597597 return self;
598598 }
......@@ -622,7 +622,7 @@ test "import io tests" {
622622
623623pub fn readLine(buf: []u8) !usize {
624624 var stdin = getStdIn() catch return error.StdInUnavailable;
625 var adapter = FileInStream.init(&stdin);
625 var adapter = FileInStream.init(stdin);
626626 var stream = &adapter.stream;
627627 var index: usize = 0;
628628 while (true) {
std/io_test.zig+2-2
......@@ -19,7 +19,7 @@ test "write a file, read it, then delete it" {
1919 var file = try os.File.openWrite(tmp_file_name);
2020 defer file.close();
2121
22 var file_out_stream = io.FileOutStream.init(&file);
22 var file_out_stream = io.FileOutStream.init(file);
2323 var buf_stream = io.BufferedOutStream(io.FileOutStream.Error).init(&file_out_stream.stream);
2424 const st = &buf_stream.stream;
2525 try st.print("begin");
......@@ -35,7 +35,7 @@ test "write a file, read it, then delete it" {
3535 const expected_file_size = "begin".len + data.len + "end".len;
3636 assert(file_size == expected_file_size);
3737
38 var file_in_stream = io.FileInStream.init(&file);
38 var file_in_stream = io.FileInStream.init(file);
3939 var buf_stream = io.BufferedInStream(io.FileInStream.Error).init(&file_in_stream.stream);
4040 const st = &buf_stream.stream;
4141 const contents = try st.readAllAlloc(allocator, 2 * 1024);
std/os/child_process.zig+2-2
......@@ -209,8 +209,8 @@ pub const ChildProcess = struct {
209209 defer Buffer.deinit(&stdout);
210210 defer Buffer.deinit(&stderr);
211211
212 var stdout_file_in_stream = io.FileInStream.init(&child.stdout.?);
213 var stderr_file_in_stream = io.FileInStream.init(&child.stderr.?);
212 var stdout_file_in_stream = io.FileInStream.init(child.stdout.?);
213 var stderr_file_in_stream = io.FileInStream.init(child.stderr.?);
214214
215215 try stdout_file_in_stream.stream.readAllBuffer(&stdout, max_output_size);
216216 try stderr_file_in_stream.stream.readAllBuffer(&stderr, max_output_size);
std/os/index.zig+1
......@@ -2149,6 +2149,7 @@ pub fn selfExePath(out_buffer: *[MAX_PATH_BYTES]u8) ![]u8 {
21492149 switch (builtin.os) {
21502150 Os.linux => return readLink(out_buffer, "/proc/self/exe"),
21512151 Os.windows => {
2152 var utf16le_buf: [windows_util.PATH_MAX_WIDE]u16 = undefined;
21522153 const utf16le_slice = try selfExePathW(&utf16le_buf);
21532154 // Trust that Windows gives us valid UTF-16LE.
21542155 const end_index = std.unicode.utf16leToUtf8(out_buffer, utf16le_slice) catch unreachable;
std/special/build_runner.zig+2-2
......@@ -49,14 +49,14 @@ pub fn main() !void {
4949
5050 var stderr_file = io.getStdErr();
5151 var stderr_file_stream: io.FileOutStream = undefined;
52 var stderr_stream = if (stderr_file) |*f| x: {
52 var stderr_stream = if (stderr_file) |f| x: {
5353 stderr_file_stream = io.FileOutStream.init(f);
5454 break :x &stderr_file_stream.stream;
5555 } else |err| err;
5656
5757 var stdout_file = io.getStdOut();
5858 var stdout_file_stream: io.FileOutStream = undefined;
59 var stdout_stream = if (stdout_file) |*f| x: {
59 var stdout_stream = if (stdout_file) |f| x: {
6060 stdout_file_stream = io.FileOutStream.init(f);
6161 break :x &stdout_file_stream.stream;
6262 } else |err| err;
std/zig/parser_test.zig+1-1
......@@ -1865,7 +1865,7 @@ var fixed_buffer_mem: [100 * 1024]u8 = undefined;
18651865
18661866fn testParse(source: []const u8, allocator: *mem.Allocator, anything_changed: *bool) ![]u8 {
18671867 var stderr_file = try io.getStdErr();
1868 var stderr = &io.FileOutStream.init(&stderr_file).stream;
1868 var stderr = &io.FileOutStream.init(stderr_file).stream;
18691869
18701870 var tree = try std.zig.parse(allocator, source);
18711871 defer tree.deinit();
test/compare_output.zig+15-15
......@@ -19,7 +19,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
1919 \\
2020 \\pub fn main() void {
2121 \\ privateFunction();
22 \\ const stdout = &(FileOutStream.init(&(getStdOut() catch unreachable)).stream);
22 \\ const stdout = &FileOutStream.init(getStdOut() catch unreachable).stream;
2323 \\ stdout.print("OK 2\n") catch unreachable;
2424 \\}
2525 \\
......@@ -34,7 +34,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
3434 \\// purposefully conflicting function with main.zig
3535 \\// but it's private so it should be OK
3636 \\fn privateFunction() void {
37 \\ const stdout = &(FileOutStream.init(&(getStdOut() catch unreachable)).stream);
37 \\ const stdout = &FileOutStream.init(getStdOut() catch unreachable).stream;
3838 \\ stdout.print("OK 1\n") catch unreachable;
3939 \\}
4040 \\
......@@ -60,7 +60,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
6060 tc.addSourceFile("foo.zig",
6161 \\use @import("std").io;
6262 \\pub fn foo_function() void {
63 \\ const stdout = &(FileOutStream.init(&(getStdOut() catch unreachable)).stream);
63 \\ const stdout = &FileOutStream.init(getStdOut() catch unreachable).stream;
6464 \\ stdout.print("OK\n") catch unreachable;
6565 \\}
6666 );
......@@ -71,7 +71,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
7171 \\
7272 \\pub fn bar_function() void {
7373 \\ if (foo_function()) {
74 \\ const stdout = &(FileOutStream.init(&(getStdOut() catch unreachable)).stream);
74 \\ const stdout = &FileOutStream.init(getStdOut() catch unreachable).stream;
7575 \\ stdout.print("OK\n") catch unreachable;
7676 \\ }
7777 \\}
......@@ -103,7 +103,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
103103 \\pub const a_text = "OK\n";
104104 \\
105105 \\pub fn ok() void {
106 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
106 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
107107 \\ stdout.print(b_text) catch unreachable;
108108 \\}
109109 );
......@@ -121,7 +121,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
121121 \\const io = @import("std").io;
122122 \\
123123 \\pub fn main() void {
124 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
124 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
125125 \\ stdout.print("Hello, world!\n{d4} {x3} {c}\n", u32(12), u16(0x12), u8('a')) catch unreachable;
126126 \\}
127127 , "Hello, world!\n0012 012 a\n");
......@@ -274,7 +274,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
274274 \\ var x_local : i32 = print_ok(x);
275275 \\}
276276 \\fn print_ok(val: @typeOf(x)) @typeOf(foo) {
277 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
277 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
278278 \\ stdout.print("OK\n") catch unreachable;
279279 \\ return 0;
280280 \\}
......@@ -356,7 +356,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
356356 \\pub fn main() void {
357357 \\ const bar = Bar {.field2 = 13,};
358358 \\ const foo = Foo {.field1 = bar,};
359 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
359 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
360360 \\ if (!foo.method()) {
361361 \\ stdout.print("BAD\n") catch unreachable;
362362 \\ }
......@@ -370,7 +370,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
370370 cases.add("defer with only fallthrough",
371371 \\const io = @import("std").io;
372372 \\pub fn main() void {
373 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
373 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
374374 \\ stdout.print("before\n") catch unreachable;
375375 \\ defer stdout.print("defer1\n") catch unreachable;
376376 \\ defer stdout.print("defer2\n") catch unreachable;
......@@ -383,7 +383,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
383383 \\const io = @import("std").io;
384384 \\const os = @import("std").os;
385385 \\pub fn main() void {
386 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
386 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
387387 \\ stdout.print("before\n") catch unreachable;
388388 \\ defer stdout.print("defer1\n") catch unreachable;
389389 \\ defer stdout.print("defer2\n") catch unreachable;
......@@ -400,7 +400,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
400400 \\ do_test() catch return;
401401 \\}
402402 \\fn do_test() !void {
403 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
403 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
404404 \\ stdout.print("before\n") catch unreachable;
405405 \\ defer stdout.print("defer1\n") catch unreachable;
406406 \\ errdefer stdout.print("deferErr\n") catch unreachable;
......@@ -419,7 +419,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
419419 \\ do_test() catch return;
420420 \\}
421421 \\fn do_test() !void {
422 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
422 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
423423 \\ stdout.print("before\n") catch unreachable;
424424 \\ defer stdout.print("defer1\n") catch unreachable;
425425 \\ errdefer stdout.print("deferErr\n") catch unreachable;
......@@ -436,7 +436,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
436436 \\const io = @import("std").io;
437437 \\
438438 \\pub fn main() void {
439 \\ const stdout = &(io.FileOutStream.init(&(io.getStdOut() catch unreachable)).stream);
439 \\ const stdout = &io.FileOutStream.init(io.getStdOut() catch unreachable).stream;
440440 \\ stdout.print(foo_txt) catch unreachable;
441441 \\}
442442 , "1234\nabcd\n");
......@@ -456,7 +456,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
456456 \\pub fn main() !void {
457457 \\ var args_it = os.args();
458458 \\ var stdout_file = try io.getStdOut();
459 \\ var stdout_adapter = io.FileOutStream.init(&stdout_file);
459 \\ var stdout_adapter = io.FileOutStream.init(stdout_file);
460460 \\ const stdout = &stdout_adapter.stream;
461461 \\ var index: usize = 0;
462462 \\ _ = args_it.skip();
......@@ -497,7 +497,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
497497 \\pub fn main() !void {
498498 \\ var args_it = os.args();
499499 \\ var stdout_file = try io.getStdOut();
500 \\ var stdout_adapter = io.FileOutStream.init(&stdout_file);
500 \\ var stdout_adapter = io.FileOutStream.init(stdout_file);
501501 \\ const stdout = &stdout_adapter.stream;
502502 \\ var index: usize = 0;
503503 \\ _ = args_it.skip();
test/tests.zig+6-6
......@@ -263,8 +263,8 @@ pub const CompareOutputContext = struct {
263263 var stdout = Buffer.initNull(b.allocator);
264264 var stderr = Buffer.initNull(b.allocator);
265265
266 var stdout_file_in_stream = io.FileInStream.init(&child.stdout.?);
267 var stderr_file_in_stream = io.FileInStream.init(&child.stderr.?);
266 var stdout_file_in_stream = io.FileInStream.init(child.stdout.?);
267 var stderr_file_in_stream = io.FileInStream.init(child.stderr.?);
268268
269269 stdout_file_in_stream.stream.readAllBuffer(&stdout, max_stdout_size) catch unreachable;
270270 stderr_file_in_stream.stream.readAllBuffer(&stderr, max_stdout_size) catch unreachable;
......@@ -578,8 +578,8 @@ pub const CompileErrorContext = struct {
578578 var stdout_buf = Buffer.initNull(b.allocator);
579579 var stderr_buf = Buffer.initNull(b.allocator);
580580
581 var stdout_file_in_stream = io.FileInStream.init(&child.stdout.?);
582 var stderr_file_in_stream = io.FileInStream.init(&child.stderr.?);
581 var stdout_file_in_stream = io.FileInStream.init(child.stdout.?);
582 var stderr_file_in_stream = io.FileInStream.init(child.stderr.?);
583583
584584 stdout_file_in_stream.stream.readAllBuffer(&stdout_buf, max_stdout_size) catch unreachable;
585585 stderr_file_in_stream.stream.readAllBuffer(&stderr_buf, max_stdout_size) catch unreachable;
......@@ -842,8 +842,8 @@ pub const TranslateCContext = struct {
842842 var stdout_buf = Buffer.initNull(b.allocator);
843843 var stderr_buf = Buffer.initNull(b.allocator);
844844
845 var stdout_file_in_stream = io.FileInStream.init(&child.stdout.?);
846 var stderr_file_in_stream = io.FileInStream.init(&child.stderr.?);
845 var stdout_file_in_stream = io.FileInStream.init(child.stdout.?);
846 var stderr_file_in_stream = io.FileInStream.init(child.stderr.?);
847847
848848 stdout_file_in_stream.stream.readAllBuffer(&stdout_buf, max_stdout_size) catch unreachable;
849849 stderr_file_in_stream.stream.readAllBuffer(&stderr_buf, max_stdout_size) catch unreachable;