]>
Commit | Line | Data |
---|---|---|
ea8adc8c | 1 | error[E0310]: the parameter type `T` may not live long enough |
ff7c6d11 | 2 | --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 |
ea8adc8c | 3 | | |
0531ce1d | 4 | LL | struct Foo<T> { |
ea8adc8c | 5 | | - help: consider adding an explicit lifetime bound `T: 'static`... |
0531ce1d | 6 | LL | foo: &'static T |
ea8adc8c XL |
7 | | ^^^^^^^^^^^^^^^ |
8 | | | |
9 | note: ...so that the reference type `&'static T` does not outlive the data it points at | |
ff7c6d11 | 10 | --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 |
ea8adc8c | 11 | | |
0531ce1d | 12 | LL | foo: &'static T |
ea8adc8c XL |
13 | | ^^^^^^^^^^^^^^^ |
14 | ||
15 | error[E0309]: the parameter type `K` may not live long enough | |
ff7c6d11 | 16 | --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 |
ea8adc8c | 17 | | |
0531ce1d | 18 | LL | trait X<K>: Sized { |
ea8adc8c | 19 | | - help: consider adding an explicit lifetime bound `K: 'a`... |
0531ce1d | 20 | LL | fn foo<'a, L: X<&'a Nested<K>>>(); |
ea8adc8c XL |
21 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
22 | | | |
23 | note: ...so that the reference type `&'a Nested<K>` does not outlive the data it points at | |
ff7c6d11 | 24 | --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 |
ea8adc8c | 25 | | |
0531ce1d | 26 | LL | fn foo<'a, L: X<&'a Nested<K>>>(); |
ea8adc8c XL |
27 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
28 | ||
29 | error[E0309]: the parameter type `Self` may not live long enough | |
ff7c6d11 | 30 | --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 |
ea8adc8c | 31 | | |
0531ce1d | 32 | LL | fn bar<'a, L: X<&'a Nested<Self>>>(); |
ea8adc8c XL |
33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
34 | | | |
35 | = help: consider adding an explicit lifetime bound `Self: 'a`... | |
36 | note: ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at | |
ff7c6d11 | 37 | --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 |
ea8adc8c | 38 | | |
0531ce1d | 39 | LL | fn bar<'a, L: X<&'a Nested<Self>>>(); |
ea8adc8c XL |
40 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
41 | ||
ff7c6d11 XL |
42 | error[E0309]: the parameter type `L` may not live long enough |
43 | --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | |
44 | | | |
0531ce1d | 45 | LL | fn baz<'a, L, M: X<&'a Nested<L>>>() { |
ff7c6d11 XL |
46 | | ^ - help: consider adding an explicit lifetime bound `L: 'a`... |
47 | | _____| | |
48 | | | | |
0531ce1d XL |
49 | LL | | //~^ ERROR may not live long enough |
50 | LL | | } | |
ff7c6d11 XL |
51 | | |_____^ |
52 | | | |
53 | note: ...so that the reference type `&'a Nested<L>` does not outlive the data it points at | |
54 | --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | |
55 | | | |
0531ce1d XL |
56 | LL | / fn baz<'a, L, M: X<&'a Nested<L>>>() { |
57 | LL | | //~^ ERROR may not live long enough | |
58 | LL | | } | |
ff7c6d11 XL |
59 | | |_____^ |
60 | ||
ea8adc8c | 61 | error[E0309]: the parameter type `K` may not live long enough |
ff7c6d11 | 62 | --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 |
ea8adc8c | 63 | | |
0531ce1d | 64 | LL | impl<K> Nested<K> { |
ea8adc8c | 65 | | - help: consider adding an explicit lifetime bound `K: 'a`... |
0531ce1d XL |
66 | LL | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { |
67 | LL | | //~^ ERROR may not live long enough | |
68 | LL | | } | |
ea8adc8c XL |
69 | | |_____^ |
70 | | | |
71 | note: ...so that the reference type `&'a Nested<K>` does not outlive the data it points at | |
ff7c6d11 | 72 | --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 |
ea8adc8c | 73 | | |
0531ce1d XL |
74 | LL | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { |
75 | LL | | //~^ ERROR may not live long enough | |
76 | LL | | } | |
ea8adc8c XL |
77 | | |_____^ |
78 | ||
79 | error[E0309]: the parameter type `M` may not live long enough | |
ff7c6d11 | 80 | --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 |
ea8adc8c | 81 | | |
0531ce1d | 82 | LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { |
ea8adc8c XL |
83 | | ^ -- help: consider adding an explicit lifetime bound `M: 'a`... |
84 | | _____| | |
85 | | | | |
0531ce1d XL |
86 | LL | | //~^ ERROR may not live long enough |
87 | LL | | } | |
ea8adc8c XL |
88 | | |_____^ |
89 | | | |
90 | note: ...so that the reference type `&'a Nested<M>` does not outlive the data it points at | |
ff7c6d11 | 91 | --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 |
ea8adc8c | 92 | | |
0531ce1d XL |
93 | LL | / fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { |
94 | LL | | //~^ ERROR may not live long enough | |
95 | LL | | } | |
ea8adc8c XL |
96 | | |_____^ |
97 | ||
0bf4aa26 | 98 | error: aborting due to 6 previous errors |
ea8adc8c | 99 | |
0531ce1d XL |
100 | Some errors occurred: E0309, E0310. |
101 | For more information about an error, try `rustc --explain E0309`. |