; A borrow of a task handle cannot be sent to another task. ; expect: reject E4001 ; phase: 3 ; spec: docs/spec/04-concurrency-and-atomics.md module test.tasks_not_send air 0 lang 0.1 features [arrays, ownership, tasks] fn @main() -> void effects [task.spawn] entry: %sc = task.scope.begin %t = task.spawn %sc, @noop() %tm = borrow.mut %t %u = task.spawn %sc, @hold(%tm) task.join %u borrow.end %tm %r = task.join %t task.scope.end %sc ret fn @noop() -> u8 effects [] entry: %z = const.u8 0 ret %z fn @hold(%x: mut>) -> void effects [] entry: ret