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