1 error[E0310]: the parameter type `A` may not live long enough
2 --> $DIR/regions-close-over-type-parameter-1.rs:20:5
4 LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
5 | -- help: consider adding an explicit lifetime bound `A: 'static`...
6 LL | box v as Box<SomeTrait+'static>
9 note: ...so that the type `A` will meet its required lifetime bounds
10 --> $DIR/regions-close-over-type-parameter-1.rs:20:5
12 LL | box v as Box<SomeTrait+'static>
15 error[E0310]: the parameter type `A` may not live long enough
16 --> $DIR/regions-close-over-type-parameter-1.rs:20:5
18 LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
19 | -- help: consider adding an explicit lifetime bound `A: 'static`...
20 LL | box v as Box<SomeTrait+'static>
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 note: ...so that it can be closed over into an object
24 --> $DIR/regions-close-over-type-parameter-1.rs:20:5
26 LL | box v as Box<SomeTrait+'static>
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 error[E0309]: the parameter type `A` may not live long enough
30 --> $DIR/regions-close-over-type-parameter-1.rs:30:5
32 LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
33 | -- help: consider adding an explicit lifetime bound `A: 'b`...
34 LL | box v as Box<SomeTrait+'b>
37 note: ...so that the type `A` will meet its required lifetime bounds
38 --> $DIR/regions-close-over-type-parameter-1.rs:30:5
40 LL | box v as Box<SomeTrait+'b>
43 error[E0309]: the parameter type `A` may not live long enough
44 --> $DIR/regions-close-over-type-parameter-1.rs:30:5
46 LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
47 | -- help: consider adding an explicit lifetime bound `A: 'b`...
48 LL | box v as Box<SomeTrait+'b>
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
51 note: ...so that it can be closed over into an object
52 --> $DIR/regions-close-over-type-parameter-1.rs:30:5
54 LL | box v as Box<SomeTrait+'b>
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
57 error: aborting due to 4 previous errors
59 Some errors occurred: E0309, E0310.
60 For more information about an error, try `rustc --explain E0309`.