You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
§14.10: the select await examples print rx.recv() as T, but recv returns Option[T] #3021
and the §14.10 loop examples bind msg = inbox.recv() and pass it straight to process(msg). Receiver.recv returns Option[T] (lib/std/channel.w: "None once closed and drained"), so under #2956 (merged, #3018) the arm binding is Option[T] and printing it as written gives Some(7); the fixtures write msg.unwrap().
Either the examples are loose and should read Some(msg) = rx.recv() / msg.unwrap(), or the spec means recv to yield T with a separate closed-channel story (a closed channel ending the select arm, or recv on a closed channel being an error the arm pattern handles). A spec question for Eric; fixtures should not settle it. Related: #2955 item 1 (timeout does not exist).
Activity
Spec errata (#2966, #3040, #3021; #2955 items 11, 13): stale examples…
ehartford commentedon Nov 6, 2026
Fixed in #3055 (docs-only, blessed by Eric 2026-11-06).