Open and answer this issue on GitHub.
bug, ready · opened 2026-11-29 · updated 2026-11-29 · 0 comments
fn main() throws {
let n = 10
let mut total = 0
for r in 0..<2 { total += (0..<n).map(fn(i) { i * 2 + r }).sum() }
println(f"{total}")
}
This gives NK1343 (rustc: type annotations needed, multiple impls satisfying i64: AddAssign<_>). Seen with the compiler built at 26182f11. With let n: i64 = 10 and let mut total: i64 = 0 it compiles.
It prints 200. An integer that nothing names is i64 (Part I).
check_numbers3.nika writes facts.summed only where the open number class is decided or typed (if decided != null || typed), so .sum() gets no ::<i64>. To check: print facts.summed for the sum’s receiver. It may share its cause with “An unannotated integer list that is summed becomes Vec
.stdout.The probe prints 200.
Found during “Chains over lists, maps and std’s other producers are one loop the compiler writes, and seq.rs leaves Rust (ADR-chain-loop-v1 D6, D7)” (#2927).