Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0803

Docs

XO0803: task started without a scope handle

error · reported by the checker

Xo has structured concurrency only: tasks are started with s.spawn(f) or s.spawn_background(f) on a scope handle inside scope s { ... }, or on a task group, so every task belongs to a scope that waits for it. There is no free spawn or go statement, and spawn on a value that is not a scope handle or group is an error. See core 7.1.

Example

fn work() {}

fn f() {
  spawn(fn() { work() })
}

Fix

fn work() {}

fn f() {
  scope s {
    s.spawn(fn() { work() })
  }
}

Run xo explain XO0803 for this text in a terminal, or see section 10.6 of the specification.