External Publication
Visit Post

Add new reserved lifetime: 'owned

Rust Internals [Unofficial] April 4, 2026
Source

In this particular case yes, however consider this example with general clone_with_string_type function that accepts another generic parameter for new string type Rust Playground, in this case we have to specify lifetimes because new string type (NS) can potentially also be a reference. So we can have multiple conversions: &'static str -> String, &'buffer str -> String, &'static str -> &'buffer str, etc.

Discussion in the ATmosphere

Loading comments...