@@ -41,54 +41,73 @@ note: ...so that the reference type `&'a Nested<K>` does not outlive the data it
41
41
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
42
43
43
error[E0309]: the parameter type `Self` may not live long enough
44
- --> $DIR/lifetime-doesnt-live-long-enough.rs:37 :5
44
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:38 :5
45
45
|
46
- 37 | fn bar<'a, L: X<&'a Nested<Self>>>();
46
+ 38 | fn bar<'a, L: X<&'a Nested<Self>>>();
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
48
|
49
49
= help: consider adding an explicit lifetime bound `Self: 'a`...
50
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:37 :5
51
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:38 :5
52
52
|
53
- 37 | fn bar<'a, L: X<&'a Nested<Self>>>();
53
+ 38 | fn bar<'a, L: X<&'a Nested<Self>>>();
54
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
55
56
+ error[E0309]: the parameter type `L` may not live long enough
57
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5
58
+ |
59
+ 42 | fn baz<'a, L, M: X<&'a Nested<L>>>() {
60
+ | ^ - help: consider adding an explicit lifetime bound `L: 'a`...
61
+ | _____|
62
+ | |
63
+ 43 | | //~^ ERROR may not live long enough
64
+ 44 | | }
65
+ | |_____^
66
+ |
67
+ note: ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
68
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5
69
+ |
70
+ 42 | / fn baz<'a, L, M: X<&'a Nested<L>>>() {
71
+ 43 | | //~^ ERROR may not live long enough
72
+ 44 | | }
73
+ | |_____^
74
+
56
75
error[E0309]: the parameter type `K` may not live long enough
57
- --> $DIR/lifetime-doesnt-live-long-enough.rs:43 :5
76
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:51 :5
58
77
|
59
- 42 | impl<K> Nested<K> {
78
+ 50 | impl<K> Nested<K> {
60
79
| - help: consider adding an explicit lifetime bound `K: 'a`...
61
- 43 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
62
- 44 | | //~^ ERROR may not live long enough
63
- 45 | | }
80
+ 51 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
81
+ 52 | | //~^ ERROR may not live long enough
82
+ 53 | | }
64
83
| |_____^
65
84
|
66
85
note: ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
67
- --> $DIR/lifetime-doesnt-live-long-enough.rs:43 :5
86
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:51 :5
68
87
|
69
- 43 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
70
- 44 | | //~^ ERROR may not live long enough
71
- 45 | | }
88
+ 51 | / fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
89
+ 52 | | //~^ ERROR may not live long enough
90
+ 53 | | }
72
91
| |_____^
73
92
74
93
error[E0309]: the parameter type `M` may not live long enough
75
- --> $DIR/lifetime-doesnt-live-long-enough.rs:46 :5
94
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:54 :5
76
95
|
77
- 46 | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
96
+ 54 | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
78
97
| ^ -- help: consider adding an explicit lifetime bound `M: 'a`...
79
98
| _____|
80
99
| |
81
- 47 | | //~^ ERROR may not live long enough
82
- 48 | | }
100
+ 55 | | //~^ ERROR may not live long enough
101
+ 56 | | }
83
102
| |_____^
84
103
|
85
104
note: ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
86
- --> $DIR/lifetime-doesnt-live-long-enough.rs:46 :5
105
+ --> $DIR/lifetime-doesnt-live-long-enough.rs:54 :5
87
106
|
88
- 46 | / fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
89
- 47 | | //~^ ERROR may not live long enough
90
- 48 | | }
107
+ 54 | / fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
108
+ 55 | | //~^ ERROR may not live long enough
109
+ 56 | | }
91
110
| |_____^
92
111
93
- error: aborting due to 6 previous errors
112
+ error: aborting due to 7 previous errors
94
113
0 commit comments