Hello,
Is a lifetime bound on generic type still useful with the latest compiler? I have noticed it specified on some structs in std lib (like enum Cow).
In an older version of the Rust book, there was a section on Advanced lifetimes (Advanced Lifetimes - The Rust Programming Language) where an example is given as struct Ref<'a, T>(&'a T);
which would not compile (T does not live long enough) and the solution is to introduce lifetime bound T: 'a . On the latest version of the compiler, I could however compile without the lifetime bound.
Also, this section is not present in the latest Rust book. Is this concept, not relevant anymore?
Is there an example, where the compiler would not be able to resolve lifetime of T without the lifetime bound explicitly specificied?
Thank you!