1 error: lifetime may not live long enough
2 --> $DIR/object-lifetime-default-from-box-error.rs:18:5
4 LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
5 | -- has type `&mut SomeStruct<'1>`
8 | ^^^^ returning this value requires that `'1` must outlive `'static`
10 help: to declare that the trait object captures data from argument `ss`, you can add an explicit `'_` lifetime bound
12 LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait + '_> {
15 error[E0507]: cannot move out of `ss.r` which is behind a mutable reference
16 --> $DIR/object-lifetime-default-from-box-error.rs:18:5
19 | ^^^^ move occurs because `ss.r` has type `Box<dyn SomeTrait>`, which does not implement the `Copy` trait
21 error[E0621]: explicit lifetime required in the type of `ss`
22 --> $DIR/object-lifetime-default-from-box-error.rs:33:5
24 LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<dyn SomeTrait+'b>) {
25 | --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>`
28 | ^^^^ lifetime `'b` required
30 error: aborting due to 3 previous errors
32 Some errors have detailed explanations: E0507, E0621.
33 For more information about an error, try `rustc --explain E0507`.