Open and answer this issue on GitHub.
ready · opened 2026-11-02 · updated 2026-11-02 · 0 comments
Found by the b34 builder (same_line, 233786b3). The defect was there before that change and is separate from same_line.
An unbound choice whose alternatives yield different output types is lowered to an alt that needs one output type. rustc then rejects it, over text and Bytes alike.
Probe:
grammar Q {
entry rule t -> String = "x" eof -> { "x" }
rule WS = (multispace1 | "//" until(line_ending))* -> { }
}
Q::t("x") → rustc: Expected ... to return Result<(&str, &str), ...>, but it returns Result<&str, ...>.
() where the value is unbound), or have the checker refuse it with a clear error.tests/compiler program built from the probe.