diff options
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/child_process.zig | 4 | ||||
| -rw-r--r-- | lib/std/os.zig | 2 | ||||
| -rw-r--r-- | lib/std/zig/render.zig | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/child_process.zig b/lib/std/child_process.zig index 6ddb92f55d..6a5fabc41f 100644 --- a/lib/std/child_process.zig +++ b/lib/std/child_process.zig @@ -446,7 +446,7 @@ pub const ChildProcess = struct { // has a value greater than 0 if ((fd[0].revents & std.os.POLL.IN) != 0) { const err_int = try readIntFd(err_pipe[0]); - return @as(SpawnError, @errSetCast(@errorFromInt(err_int))); + return @as(SpawnError, @errorCast(@errorFromInt(err_int))); } } else { // Write maxInt(ErrInt) to the write end of the err_pipe. This is after @@ -459,7 +459,7 @@ pub const ChildProcess = struct { // Here we potentially return the fork child's error from the parent // pid. if (err_int != maxInt(ErrInt)) { - return @as(SpawnError, @errSetCast(@errorFromInt(err_int))); + return @as(SpawnError, @errorCast(@errorFromInt(err_int))); } } } diff --git a/lib/std/os.zig b/lib/std/os.zig index 565546c281..ceeaa610d6 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -5419,7 +5419,7 @@ pub fn dl_iterate_phdr( } }.callbackC, @as(?*anyopaque, @ptrFromInt(@intFromPtr(&context))))) { 0 => return, - else => |err| return @as(Error, @errSetCast(@errorFromInt(@as(u16, @intCast(err))))), // TODO don't hardcode u16 + else => |err| return @as(Error, @errorCast(@errorFromInt(@as(u16, @intCast(err))))), // TODO don't hardcode u16 } } diff --git a/lib/std/zig/render.zig b/lib/std/zig/render.zig index 709d9f7706..bb4d6a9e8e 100644 --- a/lib/std/zig/render.zig +++ b/lib/std/zig/render.zig @@ -1444,7 +1444,7 @@ fn renderBuiltinCall( const slice = tree.tokenSlice(builtin_token); const rewrite_two_param_cast = params.len == 2 and for ([_][]const u8{ "@bitCast", - "@errSetCast", + "@errorCast", "@floatCast", "@intCast", "@ptrCast", @@ -1505,6 +1505,8 @@ fn renderBuiltinCall( try ais.writer().writeAll("@intFromPtr"); } else if (mem.eql(u8, slice, "@fabs")) { try ais.writer().writeAll("@abs"); + } else if (mem.eql(u8, slice, "@errSetCast")) { + try ais.writer().writeAll("@errorCast"); } else { try renderToken(ais, tree, builtin_token, .none); // @name } |
