What are subtype lifetimes

Subtype lifetimes are compiler checks ensuring one lifetime outlives another to prevent dangling references.

Subtype lifetimes are the compiler's internal mechanism for verifying that one lifetime region outlives another during type checking. The Rust compiler uses HigherRankedSubtypeError diagnostics when it cannot prove that a generic lifetime constraint holds for all possible substitutions. This check occurs in the borrow checker's type relation logic, specifically when relating types with binders like for<'a> fn(&'a T). If the compiler cannot establish the required outlives relationship, it reports a higher-ranked subtype error.