1error[E0759]: `ss` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
2  --> $DIR/object-lifetime-default-from-box-error.rs:18:5
3   |
4LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
5   |             --------------- this data with an anonymous lifetime `'_`...
6...
7LL |     ss.r
8   |     ^^^^ ...is captured and required to live as long as `'static` here
9   |
10help: to declare that the trait object captures data from argument `ss`, you can add an explicit `'_` lifetime bound
11   |
12LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait + '_> {
13   |                                                   ++++
14
15error[E0621]: explicit lifetime required in the type of `ss`
16  --> $DIR/object-lifetime-default-from-box-error.rs:31:12
17   |
18LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<dyn SomeTrait+'b>) {
19   |                   --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>`
20...
21LL |     ss.r = b;
22   |            ^ lifetime `'b` required
23
24error: aborting due to 2 previous errors
25
26Some errors have detailed explanations: E0621, E0759.
27For more information about an error, try `rustc --explain E0621`.
28