Open and answer this issue on GitHub.
ready · opened 2026-11-03 · updated 2026-11-03 · 0 comments
A tuple match subject with a list element moves out of a reference.
Probe: xs: ref Vec[K], K not Copy:
match (xs[0], w) { (K::A(x), K::A(y)) => ..., _ => ... }
lowers to match (*index::get(&xs, 0), w); rustc refuses it (cannot move out of a shared reference).
by_reference, emit_match_subject).tests/compiler program with the probe.Found by b40 (#1161); worked around there with a nested match, which goes when this is fixed.
Generated by Claude Code