TUSST — the Stroop SigilTUSST
journeyforgecampaignadvanced
sign in
‹ advanced path

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.

serves: Rust/C++ systems programming6 lessons · ~3.5h
progress0/6
Start track

// lessons

  1. 01

    Stack, Heap & Who Owns What

    Read a value's real memory layout and say which part lives where.

  2. 02

    Move vs Copy

    Predict whether an assignment moves or copies — and prove it compiles.

  3. 03

    Partial Moves

    Move one field out of a struct and keep using the rest, legally.

  4. 04

    Borrowing Rules in Practice

    Fix aliasing errors by narrowing scope instead of reaching for clone().

  5. 05

    Reborrowing & Deref Coercion

    Explain why &mut T passes to a &T parameter, and why String passes as &str.

  6. 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.

TUSST · The Ultimate Stellar Supreme Tutorial

learn rust → master stellar · open-source