{
  "id": 5266773,
  "title": "🦀 Rust Master Class - Chapter 20: Advanced Lifetimes",
  "url": "https://urgent.news/2026/09/03/rust-master-class-chapter-20-advanced-lifetimes",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-03T06:31:50.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dbillion/rust-master-class-chapter-20-advanced-lifetimes-14h4"
  },
  "original_language": "en",
  "account": "Rust's advanced lifetimes go beyond basic function signatures, tackling complex reference relationships, subtyping, and memory safety constraints. Key concepts include the outlives relationship, lifetime bounds, variance, and anonymous lifetimes. The outlives relationship determines if one lifetime lasts at least as long as another, written as b: a. Lifetime bounds can be applied to generic types, with implied bounds assumed by default in many cases. Subtyping and variance describe how the subtyping relationship between lifetimes influences complex types, with three types of variance: covariance, contravariance, and invariance. Anonymous lifetimes, represented by _, allow the compiler to infer lifetimes when there's a single logical choice. Lifetime elision rules automate the omission of lifetimes in function signatures, including each reference parameter getting its own unique lifetime, assigning the single input lifetime to all output references, and assigning the lifetime of self to all output references when self is present.",
  "summary": "🦀 Rust Master Class - Chapter 20: Advanced Lifetimes Visiting my grandfather's grave. The time we had wasn't enough, but it was what we had. Lifetimes in Rust aren't about duration — they're about knowing what outlives what. Advanced lifetimes in Rust extend beyond basic function signatures to handle complex reference relationships, subtyping, and memory safety constraints. Based on the sources,…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}