Ownership, Moves & Drops
The model the borrow checker is actually enforcing. Where a value lives, when it moves, when it is copied instead, and the exact point it is destroyed.
// lessons
- 01
Stack, Heap & Who Owns What
Read a value's real memory layout and say which part lives where.
- 02
Move vs Copy
Predict whether an assignment moves or copies — and prove it compiles.
- 03
Partial Moves
Move one field out of a struct and keep using the rest, legally.
- 04
Borrowing Rules in Practice
Fix aliasing errors by narrowing scope instead of reaching for clone().
- 05
Reborrowing & Deref Coercion
Explain why &mut T passes to a &T parameter, and why String passes as &str.
- 06
Drop Order & RAII
Predict destruction order, and release a resource without a close() call.
Every exercise compiles and runs in the Forge sandbox — standard library only, no external crates.
