Open and answer this issue on GitHub.
bug, ready · opened 2026-11-30 · updated 2026-11-30 · 0 comments
use std::io
fn main() throws {
let u = io::lines().filter(fn(l) { l.len() > 1 })
println(f"{u.nth(1) ?? "none"}")
}
It should print the second long line, or none (Part I 4.5). It stops with NK1343: rustc reports mismatched types and suggests calling Into::into to convert &'static str into Text.
let x = u.nth(1) followed by x != null runs. It fails on b36e564a and on the binary from before run 6 of #2927 alike.
The emitter writes nikaia_std::index::or(u.nth(1).await?, || "none") without the literal’s .into(), because the type of nth’s result is not a text that the fallback rule knows.
Check: lower the probe and read the or call.
nth (or next) of a kept stream state yields text.tests/compiler/tests/ with the probe above, with stdin both with and without a second long line, passing in both settings.The probe prints the line or none in both settings, and the lines, stream and fallback test groups stay green.
Found in run 6 of “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).