Open and answer this issue on GitHub.
bug, ready · opened 2026-11-29 · updated 2026-11-29 · 0 comments
fn main() throws {
let xs = [1, 2, 3]
let s = xs.iter().sum()
let v: Vec[i64] = xs.iter().collect()
println(f"{v.len()} {s}")
}
This gives NK1343. rustc reports mismatched types: expected List<i64>, found List<i32>. The lowered Rust writes let xs: Vec<i32> and let s: i32. It fails the same way on c2554dfb and on the tree of the second run of #2927. Without the sum line, the program prints 3.
The program prints 3 6. An integer literal that nothing names is i64 (Part I).
The checker’s summed fact (CheckFacts.summed) gives the literal’s open integer type as i32, and the let of xs takes that type. To check: print facts.summed for the sum node.
i64 unless something names a narrower type..stdout.The probe prints 3 6.
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).