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