1
- error[E0310]: the parameter type `T` may not live long enough
2
- --> $DIR/lifetime-doesnt-live-long-enough.rs:19:10
3
- |
4
- LL | foo: &'static T
5
- | ^^^^^^^^^^
6
- | |
7
- | the parameter type `T` must be valid for the static lifetime...
8
- | ...so that the reference type `&'static T` does not outlive the data it points at
9
- |
10
- help: consider adding an explicit lifetime bound
11
- |
12
- LL | struct Foo<T: 'static> {
13
- | +++++++++
14
-
15
1
error[E0309]: the parameter type `K` may not live long enough
16
- --> $DIR/lifetime-doesnt-live-long-enough.rs:41 :33
2
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:36 :33
17
3
|
18
4
LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
19
5
| -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
@@ -26,7 +12,7 @@ LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() where K: 'a {
26
12
| +++++++++++
27
13
28
14
error[E0309]: the parameter type `M` may not live long enough
29
- --> $DIR/lifetime-doesnt-live-long-enough.rs:44 :36
15
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:39 :36
30
16
|
31
17
LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
32
18
| -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
@@ -39,7 +25,7 @@ LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b + 'a>() {
39
25
| ++++
40
26
41
27
error[E0309]: the parameter type `K` may not live long enough
42
- --> $DIR/lifetime-doesnt-live-long-enough.rs:24 :19
28
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:19 :19
43
29
|
44
30
LL | fn foo<'a, L: X<&'a Nested<K>>>();
45
31
| -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
@@ -52,7 +38,7 @@ LL | fn foo<'a, L: X<&'a Nested<K>>>() where K: 'a;
52
38
| +++++++++++
53
39
54
40
error[E0309]: the parameter type `Self` may not live long enough
55
- --> $DIR/lifetime-doesnt-live-long-enough.rs:28 :19
41
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:23 :19
56
42
|
57
43
LL | fn bar<'a, L: X<&'a Nested<Self>>>();
58
44
| -- ^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at
@@ -65,7 +51,7 @@ LL | fn bar<'a, L: X<&'a Nested<Self>>>() where Self: 'a;
65
51
| ++++++++++++++
66
52
67
53
error[E0309]: the parameter type `L` may not live long enough
68
- --> $DIR/lifetime-doesnt-live-long-enough.rs:32 :22
54
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:27 :22
69
55
|
70
56
LL | fn baz<'a, L, M: X<&'a Nested<L>>>() {
71
57
| -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
@@ -77,7 +63,6 @@ help: consider adding an explicit lifetime bound
77
63
LL | fn baz<'a, L: 'a, M: X<&'a Nested<L>>>() {
78
64
| ++++
79
65
80
- error: aborting due to 6 previous errors
66
+ error: aborting due to 5 previous errors
81
67
82
- Some errors have detailed explanations: E0309, E0310.
83
- For more information about an error, try `rustc --explain E0309`.
68
+ For more information about this error, try `rustc --explain E0309`.
0 commit comments