Rust 2024 introduces a new default for `impl Trait` in return positions, allowing hidden types to use any generic parameter in scope, including lifetimes. A new 'use bound' syntax provides explicit control over which generics are captured. These changes aim to reduce confusion and improve consistency, addressing usability problems and inconsistencies with existing rules.
Table of contents
TL;DRBackground: return-position impl TraitUsability problems with this designRust 2024 designConclusionAppendix: Relevant links1 Comment
Sort: