aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler/resinator/errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-06-28 06:59:11 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-07-07 22:43:51 -0700
commit0b3f0124dc33403d329fb8ee63a93215d9af1f1e (patch)
tree3a94c321398ab21810b73c55411523d005b503fa /lib/compiler/resinator/errors.zig
parent7c42517151cf06b67268aec3be715b3e303e014a (diff)
downloadzig-0b3f0124dc33403d329fb8ee63a93215d9af1f1e.tar.gz
zig-0b3f0124dc33403d329fb8ee63a93215d9af1f1e.zip
std.io: move getStdIn, getStdOut, getStdErr functions to fs.File
preparing to rearrange std.io namespace into an interface how to upgrade: std.io.getStdIn() -> std.fs.File.stdin() std.io.getStdOut() -> std.fs.File.stdout() std.io.getStdErr() -> std.fs.File.stderr()
Diffstat (limited to 'lib/compiler/resinator/errors.zig')
-rw-r--r--lib/compiler/resinator/errors.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/resinator/errors.zig b/lib/compiler/resinator/errors.zig
index 9727872367..72156beff2 100644
--- a/lib/compiler/resinator/errors.zig
+++ b/lib/compiler/resinator/errors.zig
@@ -63,14 +63,14 @@ pub const Diagnostics = struct {
pub fn renderToStdErr(self: *Diagnostics, cwd: std.fs.Dir, source: []const u8, tty_config: std.io.tty.Config, source_mappings: ?SourceMappings) void {
std.debug.lockStdErr();
defer std.debug.unlockStdErr();
- const stderr = std.io.getStdErr().writer();
+ const stderr = std.fs.File.stderr().writer();
for (self.errors.items) |err_details| {
renderErrorMessage(stderr, tty_config, cwd, err_details, source, self.strings.items, source_mappings) catch return;
}
}
pub fn renderToStdErrDetectTTY(self: *Diagnostics, cwd: std.fs.Dir, source: []const u8, source_mappings: ?SourceMappings) void {
- const tty_config = std.io.tty.detectConfig(std.io.getStdErr());
+ const tty_config = std.io.tty.detectConfig(std.fs.File.stderr());
return self.renderToStdErr(cwd, source, tty_config, source_mappings);
}