error[E0310]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... LL | foo: &'static T | ^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | LL | foo: &'static T | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | LL | trait X: Sized { | - help: consider adding an explicit lifetime bound `K: 'a`... LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `Self` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `Self: 'a`... note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `L` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | LL | fn baz<'a, L, M: X<&'a Nested>>() { | ^ - help: consider adding an explicit lifetime bound `L: 'a`... | _____| | | LL | | //~^ ERROR may not live long enough LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | LL | / fn baz<'a, L, M: X<&'a Nested>>() { LL | | //~^ ERROR may not live long enough LL | | } | |_____^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | LL | impl Nested { | - help: consider adding an explicit lifetime bound `K: 'a`... LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { LL | | //~^ ERROR may not live long enough LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { LL | | //~^ ERROR may not live long enough LL | | } | |_____^ error[E0309]: the parameter type `M` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | LL | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { | ^ -- help: consider adding an explicit lifetime bound `M: 'a`... | _____| | | LL | | //~^ ERROR may not live long enough LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | LL | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { LL | | //~^ ERROR may not live long enough LL | | } | |_____^ error: aborting due to 6 previous errors Some errors occurred: E0309, E0310. For more information about an error, try `rustc --explain E0309`.