Conceptual
Login

Lifetime Elision Rules

Three rules let most signatures omit lifetimes: each input reference gets its own lifetime; a single input lifetime is assigned to all outputs; and &self's lifetime is assigned to outputs in methods. When no rule applies, explicit annotations are required.

This Concept is waiting for its first lesson!

Three rules let most signatures omit lifetimes: each input reference gets its own lifetime; a single input lifetime is assigned to all outputs; and &self's lifetime is assigned to outputs in methods. When no rule applies, explicit annotations are required.

Are you a teacher? Sign in to start contributing.

Sign In