return null and return (x, x) lowers to a tuple where an Option is wantedOpen and answer this issue on GitHub.
ready · opened 2026-11-02 · updated 2026-11-02 · 0 comments
Found by the grammar_run move (M2, #125), 2026-11-02.
A lambda whose body holds both return null and return (x, x) lowers to Rust that rustc refuses: “expected Option, found tuple”. The non-null return is not wrapped in Some(...) when the lambda’s result is optional.
To build:
return in a lambda whose result is T? lowers wrapped as Some(...)..filter_map with return null and return (x, x)) with its .stdout.