External Publication
Visit Post

Add new reserved lifetime: 'owned

Rust Internals [Unofficial] June 13, 2026
Source

This sounds like you want, for any 'a and 'b such that 'a: 'b, to be able to convert from &'a str to &'b str, and to be able to convert from &'a str to String.

You don’t need to fill in a unique minimum 'b for the String case. You could just say that any 'b works. This is more-or-less how I abstract over “there’s a particular minimum” and “there’s no minimum” in my own crates.

This is why I brought up higher-ranked trait bounds (in this case for<'b>).

Discussion in the ATmosphere

Loading comments...