@@ -2,7 +2,10 @@ error[E0310]: the parameter type `T` may not live long enough
2
2
--> $DIR/lifetime-doesnt-live-long-enough.rs:19:10
3
3
|
4
4
LL | foo: &'static T
5
- | ^^^^^^^^^^ ...so that the reference type `&'static T` does not outlive the data it points at
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
6
9
|
7
10
help: consider adding an explicit lifetime bound...
8
11
|
@@ -13,7 +16,9 @@ error[E0309]: the parameter type `K` may not live long enough
13
16
--> $DIR/lifetime-doesnt-live-long-enough.rs:41:33
14
17
|
15
18
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
19
+ | -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
20
+ | |
21
+ | the parameter type `K` must be valid for the lifetime `'a` as defined here...
17
22
|
18
23
help: consider adding an explicit lifetime bound...
19
24
|
@@ -24,7 +29,9 @@ error[E0309]: the parameter type `M` may not live long enough
24
29
--> $DIR/lifetime-doesnt-live-long-enough.rs:44:36
25
30
|
26
31
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
32
+ | -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
33
+ | |
34
+ | the parameter type `M` must be valid for the lifetime `'a` as defined here...
28
35
|
29
36
help: consider adding an explicit lifetime bound...
30
37
|
@@ -35,7 +42,9 @@ error[E0309]: the parameter type `K` may not live long enough
35
42
--> $DIR/lifetime-doesnt-live-long-enough.rs:24:19
36
43
|
37
44
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
45
+ | -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
46
+ | |
47
+ | the parameter type `K` must be valid for the lifetime `'a` as defined here...
39
48
|
40
49
help: consider adding an explicit lifetime bound...
41
50
|
@@ -46,7 +55,9 @@ error[E0309]: the parameter type `Self` may not live long enough
46
55
--> $DIR/lifetime-doesnt-live-long-enough.rs:28:19
47
56
|
48
57
LL | fn bar<'a, L: X<&'a Nested<Self>>>();
49
- | ^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at
58
+ | -- ^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at
59
+ | |
60
+ | the parameter type `Self` must be valid for the lifetime `'a` as defined here...
50
61
|
51
62
help: consider adding an explicit lifetime bound...
52
63
|
@@ -57,7 +68,9 @@ error[E0309]: the parameter type `L` may not live long enough
57
68
--> $DIR/lifetime-doesnt-live-long-enough.rs:32:22
58
69
|
59
70
LL | fn baz<'a, L, M: X<&'a Nested<L>>>() {
60
- | ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
71
+ | -- ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
72
+ | |
73
+ | the parameter type `L` must be valid for the lifetime `'a` as defined here...
61
74
|
62
75
help: consider adding an explicit lifetime bound...
63
76
|
0 commit comments