I've seen this kind of code in the official reference:
trait Bar<'a>: 'a { }
I haven't thought of this kind of case.
I intuitively interpret "lifetime bound" of a type as follows:
some_reference: &'a Some_Type = &instance_of_Some_Type;
T: 'a // T is borrowed by "instance_of_Some_Type"
What's the meaning of trait Bar<'a>: 'a { } — there's a method which uses a parameter borrowing the type?
Is it the same as this?
impl Bar<'a> for Another_Type
where
Another_Type: 'a
{
}
I can't think of the usage of above implication, what is an example usage of this case? I'm having a hard time getting the meaning of "lifetime parameter of a trait".