Rust lifetimes: borrowing references safely

12 steps · about 6 h 19 min · Intermediate

  1. Borrowing and References in Rust Explained (video, YouTube, 15 min)

    Start with the borrowing rules for shared and mutable references, since lifetimes only make sense once you know them.

  2. Borrowing and References in Rust Explained (article, DEV Community (Augustine Madu), 12 min)

    Reinforces the borrowing rules in writing and ends with a first look at why references can't outlive their owner.

  3. What Are Lifetimes in Rust? A Beginner-Friendly Explanation (article, Rust FAQ, 10 min)

    A lease-and-apartment analogy gives you an intuition before you meet the syntax.

  4. Lifetimes in Rust Explained with Examples (video, YouTube, 15 min)

    Shows scopes and dangling references in code, which turns the analogy into something concrete.

  5. Validating References with Lifetimes - The Rust Programming Language (doc, doc.rust-lang.org, 40 min)

    The official chapter covers annotations, structs, the elision rules and 'static, and everything after it builds on it.

  6. Validating References with Lifetimes - The Rust Programming Language (interactive, Brown University Rust Book (experiment), 30 min)

    The same chapter with quizzes and borrow-checker visualisations, so you can test whether the idea stuck.

  7. How to Use Rust Lifetimes Correctly (blog, OneUptime, 12 min)

    A compact recap that stresses annotations describe relationships and don't control how long values live.

  8. Rust Lifetimes Explained: A Complete Deep-Dive for 2026 (article, Rustify, 20 min)

    Goes deeper on elision, multiple lifetimes and how lifetimes relate to drop order.

  9. RustCurious lesson 11: Reborrowing and Rust's Invisible Lifetimes (video, RustCurious (YouTube), 20 min)

    Visualises implicit reborrows, the hidden lifetimes that often confuse people when an error appears.

  10. Crust of Rust: Lifetime Annotations (video, Jon Gjengset (YouTube), 2 h 30 min)

    A long live-coding session that builds a real string splitter and shows when you need multiple lifetimes.

  11. Confounding Rust lifetimes (blog, Kåre von Geijer, 30 min)

    Works through trickier cases, including mutable borrows and structs that hold references, once the basics are solid.

  12. Lifetimes - The Rustonomicon (reference, doc.rust-lang.org, 25 min)

    Finish with the formal view of lifetimes as named regions of code, the model the borrow checker uses.