aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-08-28 10:49:31 -0700
committerGitHub <noreply@github.com>2024-08-28 10:49:31 -0700
commit31fef6f1103ea64a899729adea13b0ab9b66cb46 (patch)
tree31c13b06483af84cd0977be8de00d3539e3e3c4d /lib/std/Thread.zig
parent9a12905a2da045b0948f612583b526bca3a1b2f0 (diff)
parentaaa7e739831f39151a37c7beb08660f0fb6ae0ed (diff)
downloadzig-31fef6f1103ea64a899729adea13b0ab9b66cb46.tar.gz
zig-31fef6f1103ea64a899729adea13b0ab9b66cb46.zip
Merge pull request #21225 from mlugg/std-builtin-type
std: update `std.builtin.Type` fields to follow naming conventions
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);
}