rust-variance
Installation
SKILL.md
Rust variance
The question: does a value that holds 'b fit where the compiler asks for 'a, given
'b: 'a? The type constructor around the lifetime decides, not the lifetime. Variance belongs to
type constructors only: a trait bound matches by equality, so nothing coerces through it.
Every quoted diagnostic comes from rustc 1.98.1, edition 2024, aarch64-apple-darwin.