1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/lifetime-doesnt-live-long-enough.rs:19:10
5 | ^^^^^^^^^^ ...so that the reference type `&'static T` does not outlive the data it points at
7 help: consider adding an explicit lifetime bound...
9 LL | struct Foo<T: 'static> {
12 error[E0309]: the parameter type `K` may not live long enough
13 --> $DIR/lifetime-doesnt-live-long-enough.rs:41:33
15 LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
16 | ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
18 help: consider adding an explicit lifetime bound...
20 LL | impl<K: 'a> Nested<K> {
23 error[E0309]: the parameter type `M` may not live long enough
24 --> $DIR/lifetime-doesnt-live-long-enough.rs:44:36
26 LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
27 | ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
29 help: consider adding an explicit lifetime bound...
31 LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b + 'a>() {
34 error[E0309]: the parameter type `K` may not live long enough
35 --> $DIR/lifetime-doesnt-live-long-enough.rs:24:19
37 LL | fn foo<'a, L: X<&'a Nested<K>>>();
38 | ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
40 help: consider adding an explicit lifetime bound...
42 LL | trait X<K: 'a>: Sized {
45 error[E0309]: the parameter type `Self` may not live long enough
46 --> $DIR/lifetime-doesnt-live-long-enough.rs:28:19
48 LL | fn bar<'a, L: X<&'a Nested<Self>>>();
51 = help: consider adding an explicit lifetime bound `Self: 'a`...
52 = note: ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at
54 error[E0309]: the parameter type `L` may not live long enough
55 --> $DIR/lifetime-doesnt-live-long-enough.rs:32:22
57 LL | fn baz<'a, L, M: X<&'a Nested<L>>>() {
58 | ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
60 help: consider adding an explicit lifetime bound...
62 LL | fn baz<'a, L: 'a, M: X<&'a Nested<L>>>() {
65 error: aborting due to 6 previous errors
67 Some errors have detailed explanations: E0309, E0310.
68 For more information about an error, try `rustc --explain E0309`.