1 error[E0515]: cannot return reference to function parameter `val`
2 --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:21:9
5 | ^^^^^^^^^^^^^^ returns a reference to data owned by the current function
7 error[E0515]: cannot return reference to function parameter `val`
8 --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:43:9
11 | ^^^^^^^^^^^^^^ returns a reference to data owned by the current function
13 error[E0515]: cannot return reference to function parameter `val`
14 --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:109:9
17 | ^^^^^^^^^^^^^^ returns a reference to data owned by the current function
19 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
20 --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:66:13
22 LL | fn use_it<'a>(val: Box<dyn ObjectTrait<Assoc = i32> + 'a>) -> &'a () {
23 | -------------------------------------- this data with lifetime `'a`...
25 | ^^^^^^^^ ...is captured and required to live as long as `'static` here
27 note: the used `impl` has a `'static` requirement
28 --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:60:30
30 LL | impl MyTrait for Box<dyn ObjectTrait<Assoc = i32>> {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^ this has an implicit `'static` lifetime requirement
32 LL | fn use_self(&self) -> &() { panic!() }
33 | -------- calling this method introduces the `impl`'s 'static` requirement
34 help: consider relaxing the implicit `'static` requirement
36 LL | impl MyTrait for Box<dyn ObjectTrait<Assoc = i32> + '_> {
39 error: aborting due to 4 previous errors
41 For more information about this error, try `rustc --explain E0515`.