1 error: lifetime may not live long enough
2 --> $DIR/object-lifetime-default-mybox.rs:27:5
4 LL | fn load1<'a,'b>(a: &'a MyBox<dyn SomeTrait>,
5 | -- -- lifetime `'b` defined here
7 | lifetime `'a` defined here
10 | ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
12 = help: consider adding the following bound: `'a: 'b`
14 error[E0521]: borrowed data escapes outside of function
15 --> $DIR/object-lifetime-default-mybox.rs:31:5
17 LL | fn load2<'a>(ss: &MyBox<dyn SomeTrait + 'a>) -> MyBox<dyn SomeTrait + 'a> {
18 | -- `ss` is a reference that is only valid in the function body
20 | ^^^^^^^^^ `ss` escapes the function body here
22 = help: consider replacing `'a` with `'static`
24 error: aborting due to 2 previous errors