aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index 87a4eec921..60021346e4 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -401,15 +401,15 @@ fn callFn(comptime f: anytype, args: anytype) switch (Impl) {
const default_value = if (Impl == PosixThreadImpl) null else 0;
const bad_fn_ret = "expected return type of startFn to be 'u8', 'noreturn', '!noreturn', 'void', or '!void'";
- switch (@typeInfo(@typeInfo(@TypeOf(f)).Fn.return_type.?)) {
- .NoReturn => {
+ switch (@typeInfo(@typeInfo(@TypeOf(f)).@"fn".return_type.?)) {
+ .noreturn => {
@call(.auto, f, args);
},
- .Void => {
+ .void => {
@call(.auto, f, args);
return default_value;
},
- .Int => |info| {
+ .int => |info| {
if (info.bits != 8) {
@compileError(bad_fn_ret);
}
@@ -422,7 +422,7 @@ fn callFn(comptime f: anytype, args: anytype) switch (Impl) {
// pthreads don't support exit status, ignore value
return default_value;
},
- .ErrorUnion => |info| {
+ .error_union => |info| {
switch (info.payload) {
void, noreturn => {
@call(.auto, f, args) catch |err| {
@@ -850,17 +850,17 @@ const WasiThreadImpl = struct {
fn entry(ptr: usize) void {
const w: *@This() = @ptrFromInt(ptr);
const bad_fn_ret = "expected return type of startFn to be 'u8', 'noreturn', 'void', or '!void'";
- switch (@typeInfo(@typeInfo(@TypeOf(f)).Fn.return_type.?)) {
- .NoReturn, .Void => {
+ switch (@typeInfo(@typeInfo(@TypeOf(f)).@"fn".return_type.?)) {
+ .noreturn, .void => {
@call(.auto, f, w.args);
},
- .Int => |info| {
+ .int => |info| {
if (info.bits != 8) {
@compileError(bad_fn_ret);
}
_ = @call(.auto, f, w.args); // WASI threads don't support exit status, ignore value
},
- .ErrorUnion => |info| {
+ .error_union => |info| {
if (info.payload != void) {
@compileError(bad_fn_ret);
}