Change:
|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `Self` may not live long enough <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:37:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 </ins> | <del> 37 |     fn bar<'a, L: X<&'a Nested<Self>>>(); </del> <ins> 38 |     fn bar<'a, L: X<&'a Nested<Self>>>(); </ins> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:37:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 </ins> | <del> 37 |     fn bar<'a, L: X<&'a Nested<Self>>>(); </del> <ins> 38 |     fn bar<'a, L: X<&'a Nested<Self>>>(); </ins> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <ins> error[E0309]: the parameter type `L` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | 42 |       fn baz<'a, L, M: X<&'a Nested<L>>>() { |       ^          - help: consider adding an explicit lifetime bound `L: 'a`... |  _____| | | 43 | |         //~^ ERROR may not live long enough 44 | |     } | |_____^ | note: ...so that the reference type `&'a Nested<L>` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | 42 | /     fn baz<'a, L, M: X<&'a Nested<L>>>() { 43 | |         //~^ ERROR may not live long enough 44 | |     } | |_____^ </ins> error[E0309]: the parameter type `K` may not live long enough <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:43:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 </ins> | <del> 42 |   impl<K> Nested<K> { </del> <ins> 50 |   impl<K> Nested<K> { </ins> |        - help: consider adding an explicit lifetime bound `K: 'a`... <del> 43 | /     fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { 44 | |         //~^ ERROR may not live long enough 45 | |     } </del> <ins> 51 | /     fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { 52 | |         //~^ ERROR may not live long enough 53 | |     } </ins> | |_____^ | note: ...so that the reference type `&'a Nested<K>` does not outlive the data it points at <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:43:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 </ins> | <del> 43 | /     fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { 44 | |         //~^ ERROR may not live long enough 45 | |     } </del> <ins> 51 | /     fn generic_in_parent<'a, L: X<&'a Nested<K>>>() { 52 | |         //~^ ERROR may not live long enough 53 | |     } </ins> | |_____^ error[E0309]: the parameter type `M` may not live long enough <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:46:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 </ins> | <del> 46 |       fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { </del> <ins> 54 |       fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { </ins> |       ^                                                -- help: consider adding an explicit lifetime bound `M: 'a`... |  _____| | | <del> 47 | |         //~^ ERROR may not live long enough 48 | |     } </del> <ins> 55 | |         //~^ ERROR may not live long enough 56 | |     } </ins> | |_____^ | note: ...so that the reference type `&'a Nested<M>` does not outlive the data it points at <del> --> $DIR/lifetime-doesnt-live-long-enough.rs:46:5 </del> <ins> --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 </ins> | <del> 46 | /     fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { 47 | |         //~^ ERROR may not live long enough 48 | |     } </del> <ins> 54 | /     fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() { 55 | |         //~^ ERROR may not live long enough 56 | |     } </ins> | |_____^ <del> error: aborting due to 6 previous errors </del> <ins> error: aborting due to 7 previous errors </ins>

Discussion:
When using to build one of my projects, I got the error I tried to minimize my code and got to . : with the command I got the error : : backtrace :
I can reproduce this with: