2017-09-22 19:13:19 -07:00
|
|
|
error[E0310]: the parameter type `T` may not live long enough
|
2020-07-10 15:13:49 -07:00
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:19:10
|
2017-09-22 19:13:19 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | foo: &'static T
|
2020-07-10 15:13:49 -07:00
|
|
|
| ^^^^^^^^^^ ...so that the reference type `&'static T` does not outlive the data it points at
|
2022-03-14 15:56:37 +01:00
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | struct Foo<T: 'static> {
|
|
|
|
| +++++++++
|
2017-09-22 19:13:19 -07:00
|
|
|
|
2022-06-12 00:47:21 +02:00
|
|
|
error[E0309]: the parameter type `K` may not live long enough
|
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:41:33
|
|
|
|
|
|
|
|
|
LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
|
|
|
|
| ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
|
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | impl<K: 'a> Nested<K> {
|
|
|
|
| ++++
|
|
|
|
|
|
|
|
error[E0309]: the parameter type `M` may not live long enough
|
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:44:36
|
|
|
|
|
|
|
|
|
LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
|
|
|
|
| ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<M>` does not outlive the data it points at
|
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b + 'a>() {
|
|
|
|
| ++++
|
|
|
|
|
2017-10-01 17:15:15 +02:00
|
|
|
error[E0309]: the parameter type `K` may not live long enough
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:24:19
|
2017-10-01 17:15:15 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | fn foo<'a, L: X<&'a Nested<K>>>();
|
2020-05-27 11:15:58 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<K>` does not outlive the data it points at
|
2022-03-14 15:56:37 +01:00
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | trait X<K: 'a>: Sized {
|
|
|
|
| ++++
|
2017-10-02 10:43:36 +02:00
|
|
|
|
|
|
|
error[E0309]: the parameter type `Self` may not live long enough
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:28:19
|
2017-10-02 10:43:36 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | fn bar<'a, L: X<&'a Nested<Self>>>();
|
2020-01-29 16:55:37 -08:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-10-02 10:43:36 +02:00
|
|
|
|
|
|
|
|
= help: consider adding an explicit lifetime bound `Self: 'a`...
|
2020-05-27 11:15:58 -07:00
|
|
|
= note: ...so that the reference type `&'a Nested<Self>` does not outlive the data it points at
|
2017-10-02 10:43:36 +02:00
|
|
|
|
2017-12-13 23:06:54 -06:00
|
|
|
error[E0309]: the parameter type `L` may not live long enough
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/lifetime-doesnt-live-long-enough.rs:32:22
|
2017-12-13 23:06:54 -06:00
|
|
|
|
|
2020-01-18 14:57:56 -08:00
|
|
|
LL | fn baz<'a, L, M: X<&'a Nested<L>>>() {
|
2022-03-14 15:56:37 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^ ...so that the reference type `&'a Nested<L>` does not outlive the data it points at
|
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | fn baz<'a, L: 'a, M: X<&'a Nested<L>>>() {
|
|
|
|
| ++++
|
2017-12-13 23:06:54 -06:00
|
|
|
|
2018-08-28 00:46:08 -04:00
|
|
|
error: aborting due to 6 previous errors
|
2017-09-22 19:13:19 -07:00
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0309, E0310.
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about an error, try `rustc --explain E0309`.
|