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