@@ -27,37 +27,64 @@ note: ...so that the reference type `&'static T` does not outlive the data it po
27
27
| ^^^^^^^^^^^^^^^
28
28
29
29
error[E0309]: the parameter type `K` may not live long enough
30
- --> $DIR/lifetime-doesnt-live-long-enough.rs:35 :5
30
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:32 :5
31
31
|
32
- 34 | impl<K> Nested<K> {
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> {
33
60
| - help: consider adding an explicit lifetime bound `K: 'a`...
34
- 35 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
35
- 36 | | }
61
+ 39 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
62
+ 40 | | }
36
63
| |_____^
37
64
|
38
65
note: ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
39
- --> $DIR/lifetime-doesnt-live-long-enough.rs:35 :5
66
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:39 :5
40
67
|
41
- 35 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
42
- 36 | | }
68
+ 39 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
69
+ 40 | | }
43
70
| |_____^
44
71
45
72
error[E0309]: the parameter type `M` may not live long enough
46
- --> $DIR/lifetime-doesnt-live-long-enough.rs:37 :5
73
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:41 :5
47
74
|
48
- 37 | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
75
+ 41 | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
49
76
| ^ -- help: consider adding an explicit lifetime bound `M: 'a`...
50
77
| _____|
51
78
| |
52
- 38 | | }
79
+ 42 | | }
53
80
| |_____^
54
81
|
55
82
note: ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
56
- --> $DIR/lifetime-doesnt-live-long-enough.rs:37 :5
83
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:41 :5
57
84
|
58
- 37 | / fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
59
- 38 | | }
85
+ 41 | / fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
86
+ 42 | | }
60
87
| |_____^
61
88
62
- error: aborting due to 4 previous errors
89
+ error: aborting due to 6 previous errors
63
90
0 commit comments