use <'lifetimes> for <'what>
summary
Argues that lifetimes are best understood as lifetimes as sets of loans and that a loans-based borrow checker checks which loans are live on each line, not code scopes. Demonstrates with a failing longest example that needs explicit lifetime parameters, shows functions that add or remove loans and a mutable-invariant case that compiles then yields a use-after-free, and explains how variance and higher-ranked lifetimes and a DeserializeOwned‑style pattern let APIs express those relationships.
AI-written summary · about
chapters (8)
- 0:00Introduction to Rust
- 1:33Ownership and referencing
- 5:30Lifetimes as loans
- 10:01Lifetime parameters
- 12:55Subtyping and variance
- 22:47Variance on structs
- 24:40Higher ranked lifetimes
- 29:06Q&A session
related talks
32mThe First Six Years in the Development of Polonius, an Improved Borrow Checker
26mThe first six years in the development of Polonius
01h 00mAn (In-) Complete Guide to C++ Object Lifetimes
22mThe Rust Borrow Checker - A Deep Dive
50mRust's Borrow Checker Proven Correct!
35mAn (In-)Complete Guide To C++ Object Lifetimes
36mThe Rust Borrow Checker: A Deep Dive
31mAn Incremental Approach to the Semantics of Borrowing
