Stdle #104 · comparisons · 2026-09-18
What does this Rust snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
fn main() { let point = (3, 0); match point { (x, y) if x == y => println!("on diagonal"), (x, 0) => println!("on x-axis at {}", x), (0, y) => println!("on y-axis at {}", y), _ => println!("elsewhere"), }}Comparisons