๐น๏ธ Practice arcade
Extra games, not extra homework โ timed sprints, survival runs that end when your lives run out, and mastery drills built from the same skills Rust teaches.
โก Sprints
Beat the clock.
๐ Bug-Hunt Time Trial
Two minutes. Each function has one bad line: a 0..=len that runs off the end, an integer average, a > that should be >=, a wrapping_add that should saturate. Find it.
๐ข Integer Sprint
Integer / toward zero, wrapping, checked and saturating overflow, as casts that truncate or saturate, and shadowing. Evaluate it before rustc does.
๐ค Bytes and Chars Sprint
len() counts bytes, chars() counts scalars, a combining accent is its own char, and split keeps its empty pieces.
๐ Closures and Iterators Sprint
What a closure captured, Fn or FnMut or FnOnce, lazy adapters that run one item at a time, filter, take and skip in order, and what position, fold and max return.
๐ช Macro Expansion Sprint
Which macro_rules! rule fits first, what an expr fragment keeps together, and whose variable a macro's let really changes.
๐ Survival
Each miss costs a life โ lose them all and the run ends.
๐งต Strings and Collections Bugs
A trim thrown away, a byte slice through an ร, len() counting bytes, insert that resets a count, remove by value. Three misses and you're out.
๐งถ Concurrency Bug Survival
A dropped JoinHandle, a Mutex locked twice, load-then-store on an atomic, one recv() for many senders, thread::sleep in async code. Three misses and you're out.
๐ฆ Ownership Survival
Moved or copied? mut or not? When is each value dropped? Say whether it compiles, and what it prints. Three misses and you're out.
๐๏ธ Collections Survival
remove(i) or remove the value, entry counts, sorted BTreeMaps, both ends of a VecDeque, heaps and Reverse, set operations, stable sorts, and the right collection for the job.
๐๏ธ Paths and Privacy
Private by default, pub struct with private fields, pub(crate), use, super:: and crate::. Does it compile, and if not, which error? Three misses and you're out.
๐ฏ Mastery
No clock โ just get N in a row.
๐ Code Review
Errors on stdout, Debug output shown to users, success after failure, a lazy map that never runs, take where skip was meant, unwrap_or hiding bad input. Catch five in a row.
๐ Control-Flow Tracer
Blocks as values, ranges with ..= and rev and step_by, labelled break and continue, and match arms tried top to bottom. Five in a row without an off-by-one.
๐ก๏ธ Think Like the Borrow Checker
Overlapping borrows, borrows that end at their last use, slices, missing lifetimes, references that outlive their value. Predict rustc's verdict five times in a row.
๐งฉ Structs and Enums Tracer
&self or &mut self? Which arm takes this variant, guard and all? What does checked_sub give back, and what's left when while let stops? Five in a row.
๐ฆ Panics, Options and Results
Which line panics and why, what parse() really accepts, where ? returns early, and whether a failure should panic, be an Option, or be a Result.
๐งฌ Traits and Dispatch
Which method runs when a default calls an override, how derived ordering compares, and whether a design wants generics, an enum or dyn Trait.
๐ Smart Pointers
Rc counts going up and down, RefCell guards that panic at run time, and Box, Rc, Arc, RefCell, Mutex or Weak for the job.
โ๏ธ Fearless Concurrency
Rc or Arc across threads, spawn versus scope, lazy futures, and whether the work wants rayon, channels, a Mutex, an atomic or async tasks.
๐ฉบ Read the Compiler
A real rustc message for a short program: a typo, a missing mut, a move, a borrow, a lifetime, a private item. Pick the one-line fix, or the line the label really points at.
โ ๏ธ Unsafe or Not?
Four lines, one spot, and only one needs an unsafe block. Raw pointers made or followed, static and static mut, unions written or read, unsafe fn calls, leaks.