diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-24 21:57:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-24 21:57:29 -0500 |
| commit | 61a50a23e88945af71c0e4c56bf378869c670f49 (patch) | |
| tree | 0281872fbe5bbfba6de1b527a14ec8fb932c9e3a /lib/std/thread.zig | |
| parent | 544bc42fd9b612462579928298ec467484763ae1 (diff) | |
| parent | d56115ef4189a7716d9371ef87df9124a61f5ab1 (diff) | |
| download | zig-61a50a23e88945af71c0e4c56bf378869c670f49.tar.gz zig-61a50a23e88945af71c0e4c56bf378869c670f49.zip | |
Merge pull request #4547 from Vexu/deprecate
Remove deprecated builtins
Diffstat (limited to 'lib/std/thread.zig')
| -rw-r--r-- | lib/std/thread.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/thread.zig b/lib/std/thread.zig index c482405c44..fcc71ae5a5 100644 --- a/lib/std/thread.zig +++ b/lib/std/thread.zig @@ -148,7 +148,7 @@ pub const Thread = struct { const default_stack_size = 16 * 1024 * 1024; const Context = @TypeOf(context); - comptime assert(@ArgType(@TypeOf(startFn), 0) == Context); + comptime assert(@typeInfo(@TypeOf(startFn)).Fn.args[0].arg_type.? == Context); if (builtin.os == builtin.Os.windows) { const WinThread = struct { @@ -158,7 +158,7 @@ pub const Thread = struct { }; fn threadMain(raw_arg: windows.LPVOID) callconv(.C) windows.DWORD { const arg = if (@sizeOf(Context) == 0) {} else @ptrCast(*Context, @alignCast(@alignOf(Context), raw_arg)).*; - switch (@typeId(@TypeOf(startFn).ReturnType)) { + switch (@typeInfo(@TypeOf(startFn).ReturnType)) { .Int => { return startFn(arg); }, @@ -201,7 +201,7 @@ pub const Thread = struct { fn linuxThreadMain(ctx_addr: usize) callconv(.C) u8 { const arg = if (@sizeOf(Context) == 0) {} else @intToPtr(*const Context, ctx_addr).*; - switch (@typeId(@TypeOf(startFn).ReturnType)) { + switch (@typeInfo(@TypeOf(startFn).ReturnType)) { .Int => { return startFn(arg); }, |
