1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/regions-close-object-into-object-5.rs:17:5
4 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
5 | - help: consider adding an explicit lifetime bound `T: 'static`...
7 LL | box B(&*v) as Box<X>
10 note: ...so that the type `B<'_, T>` will meet its required lifetime bounds
11 --> $DIR/regions-close-object-into-object-5.rs:17:5
13 LL | box B(&*v) as Box<X>
16 error[E0310]: the parameter type `T` may not live long enough
17 --> $DIR/regions-close-object-into-object-5.rs:17:5
19 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
20 | - help: consider adding an explicit lifetime bound `T: 'static`...
22 LL | box B(&*v) as Box<X>
23 | ^^^^^^^^^^^^^^^^^^^^
25 note: ...so that it can be closed over into an object
26 --> $DIR/regions-close-object-into-object-5.rs:17:5
28 LL | box B(&*v) as Box<X>
29 | ^^^^^^^^^^^^^^^^^^^^
31 error[E0310]: the parameter type `T` may not live long enough
32 --> $DIR/regions-close-object-into-object-5.rs:17:9
34 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
35 | - help: consider adding an explicit lifetime bound `T: 'static`...
37 LL | box B(&*v) as Box<X>
40 note: ...so that the type `T` will meet its required lifetime bounds
41 --> $DIR/regions-close-object-into-object-5.rs:17:9
43 LL | box B(&*v) as Box<X>
46 error[E0310]: the parameter type `T` may not live long enough
47 --> $DIR/regions-close-object-into-object-5.rs:17:9
49 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
50 | - help: consider adding an explicit lifetime bound `T: 'static`...
52 LL | box B(&*v) as Box<X>
55 note: ...so that the reference type `&dyn A<T>` does not outlive the data it points at
56 --> $DIR/regions-close-object-into-object-5.rs:17:9
58 LL | box B(&*v) as Box<X>
61 error[E0310]: the parameter type `T` may not live long enough
62 --> $DIR/regions-close-object-into-object-5.rs:17:9
64 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
65 | - help: consider adding an explicit lifetime bound `T: 'static`...
67 LL | box B(&*v) as Box<X>
70 note: ...so that the type `T` will meet its required lifetime bounds
71 --> $DIR/regions-close-object-into-object-5.rs:17:9
73 LL | box B(&*v) as Box<X>
76 error[E0310]: the parameter type `T` may not live long enough
77 --> $DIR/regions-close-object-into-object-5.rs:17:11
79 LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
80 | - help: consider adding an explicit lifetime bound `T: 'static`...
82 LL | box B(&*v) as Box<X>
85 note: ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
86 --> $DIR/regions-close-object-into-object-5.rs:17:11
88 LL | box B(&*v) as Box<X>
91 error: aborting due to 6 previous errors
93 For more information about this error, try `rustc --explain E0310`.