3 ms·
What kind of cases do you still need to write explicit lifetimes?
by haberman 12y ago
What kind of cases do you still need to write explicit lifetimes?
- steveklabnik 12y agoI actually haven't had to since elision was implemented, so I can't give you a good rule of thumb from experience. Here's an overview of how the rules applied to the standard library at the time they were implemented, which is where the percentage came from: https://gist.github.com/aturon/da49a6d00099fdb0e861 https://gist.github.com/aturon/da49a6d00099fdb0e861
- xKingfisher 12y agoThe most common case I have run into is storing a reference inside another data structure.