Why this fires¶
await received a value whose known type is neither Future<T> nor Task<T>.
Awaiting either wrapper produces its T; ordinary values are already available
and cannot be suspended.
let value = await 42 // TE220Fix it¶
Remove await from an ordinary value, or pass the result of an async fn or
spawn expression:
async fn load() -> int { 42 }
let value: int = await load()Values explicitly typed any remain a gradual boundary and are checked by the
runtime. Prefer a concrete Future<T> or Task<T> annotation at API boundaries.