Open and answer this issue on GitHub.
decision · opened 2026-10-19 · updated 2026-10-20 · 3 comments
The rest of #703: these cases were found while building its items (0.0.1098–0.0.1103). Each one is accepted by the checker and refused by rustc. The owner’s rule applies: what the checker accepts must compile.
To build (each with a probe in tests/accepted/ or a refusal test)
mut parameter handed on to a mut parameter. match e { E::Num(n) => bump(n) } with bump(mut n: i64) fails with E0596, because n is copied out of the slot first. Item 10 covered only parts that are not copies.let h = f(true), where f returns a TaskHandle that is never used, is not NK2109. The check only follows let h = spawn ….struct S { f: fn(ref String, ref String) -> ref String sync } fails with an unused 'a: the struct is counted as holding a view because of the function type’s result. A function type’s own views are the call’s (for<'call>, item 8), not the struct’s.TaskHandle stored in a struct field. The struct derives Debug and Clone, and the handle implements neither. First check what Part I says about copying a struct that holds a handle. If the specification does not settle it, set this item to decision with an introduction for the owner.Shared(Vec()) (E0282). A read such as len() counts as the empty list’s first use (ADR-135 D2), so NK1153 is never reported. First read ADR-135 D2 on what counts as a typing use. If the record does not settle it, this is a decision for the owner.Item 6, from #703 item 11 (0.0.1104). An impl narrower than its trait’s declaration is now lowered as an inherent method plus a bridge. If the type also has its own method with the same name, the two inherent methods clash in Rust. Check whether the checker refuses that today. If it does not, either refuse it or give one of them a different name in the Rust, then add a probe or a test.
Generated by Claude Code
Two more items, found while building #732:
match over a struct whose only arm is Point { x, .. } is refused as NK1151 (not every case covered) unless it has an else. A struct pattern whose parts are all bindings or .. covers every value, so the coverage check has to count it as total. Write a test that asserts no finding.with that names every field still evaluates its base, and rustc warns “unused variable” for it. This is harmless, but the generated code should carry no warning. Lower it without reading the base, or bind the base as _.Generated by Claude Code
Items 1, 2, 3, 7 and 8 are built in 0.0.1113:
let mut.NK2109 when nobody takes it.with that names every field reads its base as _.The defect found on the way, a name handed to a mut parameter without let mut being accepted, is now #734.
Three items are left, and each needs a decision from the owner:
Clone) or printing (Debug) a struct that holds one.len() read counts.f.count() means.Label → decision. Each topic gets an introduction from zero before it is asked.
Generated by Claude Code