Issue #2605: let mut ws = [xs.iter().map(fn(x) { x * 2 })] with `let v = ws.first() ??…

Open and answer this issue on GitHub.

decision, bugs · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Filed by the driver from the Found: of the run of issue-1424 (#1424) (owner, 2026-11-06).

Found

let mut ws = [xs.iter().map(fn(x) { x * 2 })] with let v = ws.first() ?? return; println(f"{v.count()}") (likewise ws.get(0), and for (i, v) in ws.iter().enumerate() { v.count() }) passes the checker and rustc refuses it with NK1343 “cannot move out of *v”; it should be NK2702 as for for v in ws (ADR-094 D4 lends the element). Traced: view_of_type (check_types.nika:45) turns a Seq into Unknown, so a view of a sequence is never marked lent. Whether to refuse a list of sequences outright or to mark a ref Seq view: no decision yet

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Back to Open Issues