1 The type definition contains some field whose type
2 requires an outlives annotation. Outlives annotations
3 (e.g., `T: 'a`) are used to guarantee that all the data in T is valid
4 for at least the lifetime `'a`. This scenario most commonly
5 arises when the type contains an associated type reference
6 like `<T as SomeTrait<'a>>::Output`, as shown in this example:
9 // This won't compile because the applicable impl of
10 // `SomeTrait` (below) requires that `T: 'a`, but the struct does
11 // not have a matching where-clause.
13 foo: <T as SomeTrait<'a>>::Output,
20 impl<'a, T> SomeTrait<'a> for T
28 Here, the where clause `T: 'a` that appears on the impl is not known to be
29 satisfied on the struct. To make this example compile, you have to add
30 a where-clause like `T: 'a` to the struct definition:
37 foo: <T as SomeTrait<'a>>::Output
44 impl<'a, T> SomeTrait<'a> for T