← Back to archive

Stdle #8 · 2026-06-14

What does this log?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

fn main() {
let mut x: Option<i32> = None;
let r = x.get_or_insert(8);
println!("{}", r);
let mut y = Some(3);
println!("{}", y.get_or_insert(8));
}
Option
2 lines
4 attempts left

Answer & explanation