diff --git a/lib/std/Thread/Pool.zig b/lib/std/Thread/Pool.zig index a96b4255e2003c3b6d23a2e73330ce5d0b33b215..516f06da0e2ef1b7eb18df5bc8f203bb75826e52 100644 --- a/lib/std/Thread/Pool.zig +++ b/lib/std/Thread/Pool.zig @@ -89,7 +89,7 @@ pub fn spawn(pool: *Pool, comptime func: anytype, args: anytype) !void { fn runFn(runnable: *Runnable) void { const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable); - const closure: *@This() = @fieldParentPtr("run_node", run_node); + const closure: *@This() = @alignCast(@fieldParentPtr("run_node", run_node)); @call(.auto, func, closure.arguments); // The thread pool's allocator is protected by the mutex.