External Publication
Visit Post

Add new reserved lifetime: 'owned

Rust Internals [Unofficial] June 12, 2026
Source
My idea with this lifetime was that it could only be used in bounds for generic type parameters, you cant make a reference with this lifetime, therefore all owned structures would be of lifetime 'owned. Because right now &'buffer str -> &'static str and &'buffer str -> String are identical to the borrow checker, but it is incorrect, because in first case it is invalid since generic 'buffer does not outlive 'static, while in second case 'buffer could be any lifetime since String makes a copy and does not hold any references to previous structures.

Discussion in the ATmosphere

Loading comments...