1 error[E0310]: the parameter type `A` may not live long enough
2 --> $DIR/regions-close-over-type-parameter-1.rs:11:5
4 LL | Box::new(v) as Box<dyn SomeTrait + 'static>
5 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
7 help: consider adding an explicit lifetime bound...
9 LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> {
12 error[E0309]: the parameter type `A` may not live long enough
13 --> $DIR/regions-close-over-type-parameter-1.rs:20:5
15 LL | Box::new(v) as Box<dyn SomeTrait + 'b>
16 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
18 help: consider adding an explicit lifetime bound...
20 LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> {
23 error: aborting due to 2 previous errors
25 Some errors have detailed explanations: E0309, E0310.
26 For more information about an error, try `rustc --explain E0309`.