A 2013 design proposal for Rust's lifetime syntax notation, exploring the use of `<>` for lifetime parameters on types and relying on semantic analysis (the resolve pass) to disambiguate lifetime names from type names. The post walks through concrete code examples and discusses several options: whether to include `&` in lifetime parameters for consistency, how the default lifetime `&` should behave, whether to allow omitting `<>` when only a lifetime parameter is present, and whether named lifetimes should always require explicit declarations on functions. It also shows how the notation handles types with both lifetime and type parameters with trait bounds.

5m read timeFrom smallcultfollowing.com
Post cover image
Table of contents
ConsiderationsThe default lifetime &How complex can it get?